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

Grammar does not fully support -XBlockArguments extension #22

Closed
patrickt opened this issue Nov 3, 2018 · 4 comments
Closed

Grammar does not fully support -XBlockArguments extension #22

patrickt opened this issue Nov 3, 2018 · 4 comments

Comments

@patrickt
Copy link
Contributor

patrickt commented Nov 3, 2018

GHC 8.6 comes with an extension, “block arguments”, that entails a drastic change to the parser. You can find the change specification here, but the tl;dr is that you can now often omit parentheses and $ invocations associated with do blocks:

local f do
  thing1
  thing2

rather than

local f $ do
  thing1
  thing2

This has drastic effects on the grammar—in the words of the proposal author:

Unless a special care is taken, an implementation will add a large number of shift-reduce conflicts to the parser, due to the reliance on the meta-rule mentioned above

This is a nontrivial change, but it’s one we should ultimately make.

@patrickt patrickt closed this as completed Mar 2, 2021
@patrickt
Copy link
Contributor Author

patrickt commented Mar 2, 2021

This is fixed.

@tek
Copy link
Contributor

tek commented Mar 2, 2021

nope, let and if are still missing!

@tek tek reopened this Mar 2, 2021
@patrickt
Copy link
Contributor Author

patrickt commented Mar 2, 2021

Oops! Good catch.

@patrickt patrickt changed the title Grammar does not support -XBlockArguments extension Grammar does not fully support -XBlockArguments extension Mar 2, 2021
@tek
Copy link
Contributor

tek commented Mar 2, 2021

now it's fixed 😅

@tek tek closed this as completed Mar 2, 2021
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

No branches or pull requests

2 participants