My elm-format fails on main.elm with the following error
ERRORS
-- SYNTAX PROBLEM ------------------------------------------------- src/main.elm
I ran into something unexpected when parsing your code!
91│ Keyboard Maybe.Nothing -> (model, Cmd.none)
^
I am looking for one of the following things:
end of input
whitespace
But the program compiles and runs fine.
I have fiddled around with the data, but am unable to see how I can make a simple reproduceable example so I have just linked to the exact line that's throwing it in my commit.
https://github.com/mordrax/cotwelm/commit/061c65f37e30f5414809fa00cbfd44567fababd1#diff-fe0712052e5a2ffc39da25a010c18097R89
If I remove the messages in question, the file formats, but then it throws an error saying those cases are not met. I can do _ -> (model, Cmd.none) instead of the two Keyboard ... cases and that will also cause elm-format to work.
Are you using Elm 0.17? This could a problem with the Maybe.Nothing, which hit a parser bug on Elm 0.16.
okay, yes, the workaround is to put parens around Maybe.Nothing. But I will fix the elm-format parser to deal with this in 0.3.2-alpha.
Also, the error message the parser provides here is pretty misleading.
Fixed in 5e24aad...b3089c5
Thanks for the report!
Oh! I just realized what your project is. I loved Castle of the Winds :D
yes! thank you for the quick fix, i didn't expect that and also I expected even less that you know and loved the game. This gives me !--==## ENERGY ##==--! yeah!
0.4.0-alpha is now released with this fix https://github.com/avh4/elm-format#installation-