haskell / happy

The Happy parser generator for Haskell
Other
286 stars 84 forks source link

Happy parse error messages should include more information #159

Open harpocrates opened 4 years ago

harpocrates commented 4 years ago

Right now, parse errors include only the line number. For example:

Calc.ly:40: Parse error

It would be helpful to include a bit more easily accessible info:

anka-213 commented 3 years ago

Would it also be possible to include information about what token was expected like in megaparsec? In theory that information should be available as well, but maybe it's not available in the generated code?