Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Can't define new operators in REPL #142

Open
jasalo opened this issue Dec 1, 2016 · 2 comments
Open

Can't define new operators in REPL #142

jasalo opened this issue Dec 1, 2016 · 2 comments

Comments

@jasalo
Copy link

jasalo commented Dec 1, 2016

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?

@process-bot
Copy link

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.

@jinjor
Copy link
Member

jinjor commented Jan 7, 2017

+1.
I need this too, for explaining grammar.

Your link above is wrong. Fix => http://elm-lang.org/docs/syntax.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants