evancz / TodoFRP

Basic Todo list example, written with FRP in Elm
75 stars 15 forks source link

Does not compile with Elm v0.12.3 #5

Closed palf closed 10 years ago

palf commented 10 years ago

results in error message: [1 of 5] Compiling Model ( Model.elm ) [2 of 5] Compiling Update ( Update.elm ) [3 of 5] Compiling Inputs ( Inputs.elm ) Import Error: Could not import value 'Model.Add'. It is not exported by module Model.

changing Inputs.elm:10 to 'import Model (..)' fixes the error but results in the following error:

[3 of 5] Compiling Inputs ( Inputs.elm ) [4 of 5] Compiling Display ( Display.elm ) Error on line 34, column 38 to 48: Could not find variable 'Text.color'.

adding 'import Text' to Display.elm will allow html to be generated; the resulting html app will not allow you to add new Todos, throwing a 'Uncaught TypeError: Cannot read property 'arity' of undefined' error.

Inspecting the generated js, it seems the _elm.Model object does not export the Task and TodoState declarations. When referenced by the Update 'Add' call, 'undefined' is passed to A3, causing the TypeError.

spaceCamel commented 10 years ago

Experienced the same problem with

$ elm --version
0.13

$ elm -m Todo.elm
[3 of 5] Compiling Inputs              ( Inputs.elm )
Import Error: Could not import value 'Model.Add'.
    It is not exported by module Model.

Fixing the import I incurred in other issues like id and . variable not found. Is it not getting some functions from the Prelude?

spaceCamel commented 10 years ago

Apparently the import mechanism has changed: https://github.com/elm-lang/Elm/issues/807

evancz commented 10 years ago

Alright, just verified that #6 fixes this. Thanks for the report and sorry for the delay!

I wasn't getting notifications for a couple repos, but that should all be resolved now!