Skip to content
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

%shift pragma for lowest priority rules #153

Merged
merged 2 commits into from Oct 7, 2019

Conversation

int-index
Copy link
Collaborator

GHC Merge Request 1856 resolves shift/reduce conflicts in GHC by using the precedence machinery of happy, marking certain rules as %prec shift.

However, the downside of this approach is that it requires a listing of all lookahead tokens. With a dedicated pragma %shift, we can avoid this.

@bgamari
Copy link
Contributor

bgamari commented Oct 3, 2019

https://gitlab.haskell.org/ghc/ghc/merge_requests/1867 is currently blocked on a release with this.

@int-index
Copy link
Collaborator Author

The AppVeyor CI failure is unrelated to the patch and is fixed in #154

@goldfirere
Copy link

This looks like it's a user-facing feature addition to happy. Have you updated the manual?

@simonmar
Copy link
Member

simonmar commented Oct 3, 2019

I'd be happy to merge this, but can we have documentation and a test please?

@int-index
Copy link
Collaborator Author

I'd be happy to merge this, but can we have documentation and a test please?

I'm on it – setting up DocBook locally proved to be a bit of a challenge. Will push an update today.

@int-index
Copy link
Collaborator Author

There's a test case and a section in the manual now.

@goldfirere
Copy link

As someone who has taught happy to undergraduates, I have an interest in a clear manual. And that interest is satisfied by this change -- thanks @int-index.

@simonmar simonmar merged commit 613fc26 into haskell:master Oct 7, 2019
@int-index int-index deleted the shift-prag branch October 7, 2019 07:20
@int-index int-index mentioned this pull request Dec 2, 2019
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.

None yet

4 participants