elm-repl
elm-repl copied to clipboard
Can't define new operators in REPL
I'm trying to build a new simple dummy operator such as:
(**) x y = x ^ y
And I've tried with different symbols, but it's always giving me this error:
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm
I ran into something unexpected when parsing your code!
4| **
^
I am looking for one of the following things:
an expression
whitespace
I've also tried with the very example from the Elm Syntax documentation page and it doesn't work:
(?) : Maybe a -> a -> a
(?) maybe default =
Maybe.withDefault default maybe
Is there a reason why defining new operators on the REPL is currently not possible?
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
+1. I need this too, for explaining grammar.
Your link above is wrong. Fix => http://elm-lang.org/docs/syntax.