Skip to content

Instantly share code, notes, and snippets.

@tgecho
Created March 5, 2016 14:18
Show Gist options
  • Save tgecho/97d8ddcbab7fe66d3ee7 to your computer and use it in GitHub Desktop.
Save tgecho/97d8ddcbab7fe66d3ee7 to your computer and use it in GitHub Desktop.
Elm whitespace confusion
viewCounter address ( id, model ) =
let context =
Counter.Context
(Signal.forwardTo address (Modify id))
(Signal.forwardTo address (always (Remove id)))
in
Counter.viewWithRemoveButton context model
{-
==== error in Bad.elm:4:8: ====
I ran into something unexpected when parsing your code!
I am looking for one of the following things:
whitespace
----
-}
I'm a little confused about the whitespace rules that lead to Bad.elm failing.
viewCounter1 address ( id, model ) =
let
context =
Counter.Context
(Signal.forwardTo address (Modify id))
(Signal.forwardTo address (always (Remove id)))
in
Counter.viewWithRemoveButton context model
viewCounter2 address ( id, model ) =
let context =
Counter.Context
(Signal.forwardTo address (Modify id))
(Signal.forwardTo address (always (Remove id)))
in
Counter.viewWithRemoveButton context model
viewCounter3 address ( id, model ) =
let context =
Counter.Context
(Signal.forwardTo address (Modify id))
(Signal.forwardTo address (always (Remove id)))
in
Counter.viewWithRemoveButton context model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment