Skip to content

Parse error recovery and incrementality for GHC #182

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

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

sgraf812
Copy link
Contributor

@sgraf812 sgraf812 commented Feb 2, 2024

No description provided.

There are a couple of stretch goals:

* `happy` could further be improved to pass a closure of its
parse state to reduction actions, so as to enable incremental parsing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and use this in GHC?

* `happy` could further be improved to pass a closure of its
parse state to reduction actions, so as to enable incremental parsing.
* Improve `happy` so that it provides a convenient and encapsulated way to
introspect the LALR item stack, for example to identify bracketing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and use this in GHC?

productions such as `'(' expr . ')'` in order to report mismatched brackets.
There is a [hacky GHC Merge Request](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4711)
that tries to achieve as much without buy in from happy.
* Improve `happy`s code base, which by now is over 25 years old.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be helpful to identify a couple of concrete things: just "modernisation", or comments, or tests, or what?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it is rather hard to spell out what could make a substantial improvment. Certainly it appears that the modularisation effort has left happy in a rather rough stage. See #183.

@aaronallen8455 aaronallen8455 merged commit 3895e51 into haskell-org:master Feb 4, 2024
@aaronallen8455
Copy link
Contributor

LGTM, thanks! I'm going to go ahead and merge this so that it's listed on the site before I submit the GSoC application. Feel free to open another PR if you want to make any changes.

@sgraf812
Copy link
Contributor Author

sgraf812 commented Feb 4, 2024

Thanks! I addressed Michael's feedback in #183.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants