Closed ghost closed 9 years ago
Something like import pincode
cannot be right. Module names in Elm are always uppercase. Maybe your file has the name pincode.elm
, but a module cannot. So you may have to rename the file. You will also have to actually put something like module Pincode where
at the top of that file. Finally, have you tried to actually run :help
in the REPL, to let it help you by explaining the commands it is able to execute?
it works, after making p
in pincode to be in Caps, and adding module Pincode where
on the top... But it is not giving me a decoded places
object
> import Pincode
> Pincode.lookupZipCode "12345"
<internal structure> : Task.Task Http.Error (List String)
But still closing this issue....
Ah, so right now the REPL does not run a task that you give it. It is just showing you the task value.
We are working on getting Elm working with node.js more, so this seems like a nice potential improvement. Can we open an issue for "Request: entering tasks should run the task" and discuss the implications of this there?
I am trying to run the zipcode program at https://github.com/evancz/elm-http without compiling it into browser. I saved in an elm file.. and entered elm-repl mode. Then, i tried to import my elm source file via "import pincode". It throws error as,