-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 2128 #2144
Fix issue 2128 #2144
Conversation
members <- P.option [] . P.try $ do | ||
indented *> reserved "where" | ||
members <- P.option [] $ do | ||
P.try $ indented *> reserved "where" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this try
? reserved "where"
should either consume everything or nothing, there should be no reason to backtrack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, try
is superfluous here.
Thanks for this. Could you please update |
Thanks! |
Cool! |
I just realized this is on |
* No backtracking out of class/instance body once 'where' is parsed * Remove unnecessary try * Update CONTRIBUTORS
This is intended to fix #2128.
That issue relates to the error messaging from the parser; the two failing cases I have added need to be compiled manually to demonstrate that the error message is accurate:
and
If you think the testing should be improved to guard automatically against a regression, please could you give me some guidance on how to approach that?