Closed ellogwen closed 5 years ago
Having the same issue, the string can't be defined with single quotes, but the message is misleading.
Thank you for the report! In 0.19 the error message looks like this:
> names = ['Alice', 'Bob', 'Charlie']
-- PARSE ERROR ------------------------------------------------------------- elm
Ran into a bad use of single quotes.
3| names = ['Alice', 'Bob', 'Charlie']
^^^^^^^
If you want to create a string, switch to double quotes:
'this' => "this"
Hint: Unlike JavaScript, Elm distinguishes between strings like "hello" and
individual characters like 'A' and '3'. If you really do want a character
though, something went wrong and I did not find the closing single quote.
Trying out elm with the elm-repl but instantly got confused be the below error message
Since double quotes are hard to write for me on my keyboard layout I got used to using single quotes for defining string. Hadn't thought that that would be a big deal in elm. Well, the error message is misleading anyway .