elm-repl icon indicating copy to clipboard operation
elm-repl copied to clipboard

Cryptic error message when starting line with `let`

Open stevenheidel opened this issue 7 years ago • 3 comments

I tried the following line in the elm-repl:

let sample = "Multipart/mixed; boundary=\"sample_boundary\";"

My problem here is that I added a let at the beginning when it shouldn't be there. So this works:

> sample = "Multipart/mixed; boundary=\"sample_boundary\";"
"Multipart/mixed; boundary=\"sample_boundary\";" : String

However, the one with the let gives me this cryptic error message:

> let sample = "Multipart/mixed; boundary=\"sample_boundary\";"
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm

I need whitespace, but got stuck on what looks like a new declaration. You are
either missing some stuff in the declaration above or just need to add some
spaces here:

5| t_s_o_l = ()
   ^
I am looking for one of the following things:

    whitespace

No idea what t_s_o_l is.

EDIT: elm repl --version 0.17.1

stevenheidel avatar Oct 23 '16 03:10 stevenheidel

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.

process-bot avatar Oct 23 '16 03:10 process-bot

We also just hit this issue in 0.18.0:

---- elm-repl 0.18.0 -----------------------------------------------------------
 :help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl>
--------------------------------------------------------------------------------
> let x = 1
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm

I need whitespace, but got stuck on what looks like a new declaration. You are
either missing some stuff in the declaration above or just need to add some
spaces here:

4| t_s_o_l = ()
   ^
I am looking for one of the following things:

    whitespace

ehamberg avatar Jan 23 '17 14:01 ehamberg

Working use case of let in is shown here -> https://guide.elm-lang.org/architecture/user_input/forms.html

Cannot help with the t_s_o_l, need to look furthur.

#85

plumpNation avatar Apr 13 '17 17:04 plumpNation