Hi everybody habe a strange problem in elm.
Just updated elm form 0.17 to 0.18. Project was running fine in 0.17 Now the complier throws an error in 018.
That's what he's saying:
-- SYNTAX PROBLEM ---------- elm-stuff/packages/elm- lang/html/1.1.0/src/Html.elm
Ran into a single quote in a variable name. This was removed in 0.18!
9| , section, nav, article, aside, header, footer, address, main', body ^
Change it to a number or an underscore, like main_ or main1
Or better yet, choose a more descriptive name!
Anyone else has this problem?
What might be the problem: I use "main" already in
main : Program Never
Elm seems to have a problem because Html has the function main, too.. Might this be the case?
kind regards
Martin
Based on your error message, it looks like you are referencing an older version of the elm-lang/html
package. You'll need to upgrade to the latest version.
The old source code had a function called main'
, which was causing the problem after the 0.18 upgrade. The single quote, or prime, was removed in Elm 0.18. Here's Evan's comment from the blog post about the 0.18 release:
Primes — Names like x' are no longer permitted. A younger me (one who was less concerned about nice variable names) certainly thought writing “x prime” was pretty neat! But in general, this syntax is too confusing to be worth it. Single quotes are generally associated with strings and characters. To see it unbalanced and part of a variable throws people off, and the benefit of having it is pretty small.
I've run into this problem. I've cloned the example project a long time ago and ran it then. I've ran the examples today after upgrading to Elm 0.18 and the problem occur. The solution was to delete the elm-stuff
directory and restart elm-reactor
which download the latest packages including html-2.0.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With