On Tuesday, September 20, 2016 at 2:03:49 PM UTC+1, Rupert Smith wrote:
>
> The docs around the basics of syntax don't really cover this:
> http://elm-lang.org/docs/syntax#type-annotations
>
In the module declaration for Task there is a 'where':
effect module Task where { command = MyCmd } exposing
with MyCmd later declared to be a type:
type MyCmd msg =
T (Task Never msg)
then later we see command used like a function:
perform onFail onSuccess task = command (T (map onSuccess task `onError` \x
-> succeed (onFail x)))
can someone explain what is going on here? I can't find any documentation
on the use of 'where' in a module declaration.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.