Skip to content

Instantly share code, notes, and snippets.

@mudphone
Last active August 29, 2015 14:19
Show Gist options
  • Save mudphone/a2343b56b05746ea25dc to your computer and use it in GitHub Desktop.
Save mudphone/a2343b56b05746ea25dc to your computer and use it in GitHub Desktop.
Elm Tasks Compile Error
Sorry if this is a dup. I thought I had posted this last night.
I have a new build of GHC 7.8.4 and Elm 0.15 on Mac OS X, and I'm getting an error trying to compile the Tasks tutorial code (from the blog post, http://elm-lang.org/learn/Tasks.elm).
I installed Elm via the install script (runhaskell BuildFromSource.hs 0.15).
The error I'm getting when trying to compile is:
````elm
$ elm make hello.elm
Error in package evancz/task-tutorial 1.0.0 in module TaskTutorial:
Error in definition getCurrentTime:
Could not find type 'Time'.
This error is probably due to bad version bounds. You should definitely
inform the maintainer of evancz/task-tutorial to get this fixed.
In the meantime, you can attempt to get rid of the problematic dependency by
modifying elm-stuff/exact-dependencies.json, though that is not a long term
solution.
````
The code I'm trying to compile is:
````elm
import Time exposing (second)
import TaskTutorial exposing (getCurrentTime, print)
-- A signal that updates to the current time every second
clock : Signal Time
clock =
Time.every second
-- Turn the clock into a signal of tasks
printTasks : Signal (Task x ())
printTasks =
Signal.map print clock
-- Actually perform all those tasks
port runner : Signal (Task x ())
port runner =
printTasks
````
I have already run the elm-package install command from the tutorial:
elm-package install evancz/task-tutorial
Is there something else I might be missing?
Thank you!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment