-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
IMPORTANTThese are serious things to focus onThese are serious things to focus ondiscussion neededfor when an implementation is uncertainfor when an implementation is uncertainmajor
Description
WithError is solid, but sometimes branches are missed and lead to very ugly errors. Furthermore, due to the intricacies of Maybe, we can get some very weird errors - which of the parts of the parser should error in Maybe a -> Maybe b -> c -> ... if neither of the Maybes are present?
This needs some discussion, but thoughts that came up were:
- Default errors for parts of the SmartParser - i.e. a
Textshould default error witherror: expecting Textthat should be overridden. - "maybe you meant one of:" seems to be... not very clear most of the time.
- Try to avoid "unknown error" as much as possible - maybe plugins should have a default "error in x plugin"?
I think the system of using parser names is probably unreliable (we name parsers with their error messages using <?> and slightly change the reporting system to make it clearer to users) - maybe there's other stuff in megaparsec that can help with error parsing? This needs some serious investigation, regardless.
Metadata
Metadata
Assignees
Labels
IMPORTANTThese are serious things to focus onThese are serious things to focus ondiscussion neededfor when an implementation is uncertainfor when an implementation is uncertainmajor