Error msg in elm repl when testing equality

Elm version 0.19.0

The elm repl identifies an error when using the equality testing operator. For example:

1 == 1
– PARSE ERROR ---------------------------------
Something went wrong with your code.
3| 1 == 1
I was expecting :

  • a declaration, like x = 5 or type alias Model = { ... }
  • the import keyword
  • a doc comment, like {-| this -}

Other comparison operators (e.g. /=, <=, >=) work as expected. Also placing the equality check in parentheses also works: (1 == 1).

Am I misunderstanding something?

This is a known bug and has an issue: https://github.com/elm/compiler/issues/1736.

Wrapping in parentheses is the way to go until this is fixed.

1 Like

Thanks. Now I can get back to working through Richard Feldman’s book.

I also found the equality test works if there is any indentation.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.