Better parse error for empy character literal
Empty character literals give an obscure error message. As an example, this code:
example = foo : bar where foo = '' bar = "asdf"
gives the following error when loaded in GHCi:
err.hs:4:6: parse error (possibly incorrect indentation or mismatched brackets)
This has affected me once, as a beginner. I've seen it affect a few other beginners, and the error message isn't very helpful to figuring out what's wrong.
It would be nice if a better error message could be reported. If there's a parse error on
'', then GHC could report something like:
err.hs:3:11: parse error on `''`. Note: Character literals may not be empty.