elm-lang / elm-repl

A REPL for Elm
BSD 3-Clause "New" or "Revised" License
170 stars 34 forks source link

Elm repl seems to want some kind of setup, can't parse values #118

Closed qimingweng closed 8 years ago

qimingweng commented 8 years ago

I just installed elm-repl for mac from the website (http://elm-lang.org/install). When I type in a simple "string", the repl fails. I feel like I'm missing something...

---- elm repl 0.17.0 -----------------------------------------------------------
 :help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl>
--------------------------------------------------------------------------------
> "string"
-- SYNTAX PROBLEM --------- elm-stuff/packages/elm-lang/core/2.1.0/src/Array.elm

I ran into something unexpected when parsing your code!

2|     ( Array
       ^
I am looking for one of the following things:

    something like `exposing (..)` which replaced `where` in 0.17
    whitespace
Mousaka commented 8 years ago

I had the same problem, whatever I typed in the repl I would get this error message.

This made it work for me: I noticed that I had an elm-stuff folder and elm-package.json in my home directory which I must have accidentally created sometime (I probably missed the --global when installing). I removed that folder and elm-package and then elm-repl started working.

So I'm guessing maybe you got two versions of elm and for some reason it doesn't load all resources for repl from the same elm-installation (and probably one of them is 0.17 and the other one is not).

evancz commented 8 years ago

Yeah, sounds like you have 0.16 and 0.17 files mixed around. Solution should be to remove the relevant elm-stuff/ directory, and possibly remove the ~/.elm directory as well. Open a new issue if that does not fix it and the issue persists in 0.17.1