Open tad-lispy opened 7 years ago
Note that the same happens not with just the whitespace, but with any syntax error that happens during the module declaration. Writing
Module View
-- Note the uppercase 'M'
or even
anything that goes here is basically ignored View exposing(..)
Gives the same vague error message
What's happening
Calling
elm-make
on a program that imports a module with whitespace before the module definition prints error that suggest's the declared module name isMain
. E.g.:Steps to reproduce
In Bash compatible shell type / paste:
Expected result
There should be at least a hint about a whitespace in a fashion similar to #21. Or maybe it should be a syntax error to have whitespace at the beginning of first non-empty line of the program? Or error not to have module name declared - that would fit with Elm's apparent preference for explicitness. Just some quick ideas :)
Side notes
Interestingly running
elm-make
on the offending module itself:gives a much better message: