-
Notifications
You must be signed in to change notification settings - Fork 94
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
Can't parse an empty GADT with “where” #358
Comments
I spent a long time debugging this today so will write down my progress. After lexing the Happily, I could simply refactor the grammar so that there was a separate rule for the the empty case which didn't have to deal with layout. Unhappily, this broke the special case where the |
This bug also applies to empty foo :: Int -> Int
foo x = z + b where
y = x where
z = y where
b = 1 parses fine by GHC but is a parse-error for |
This also applies to associated data declarations in an instance (which are different in the AST), as I just found out. |
This code is accepted by GHC but not by HSE:
Here's a test case:
I'm using haskell-src-exts from master (commit 1a3a7b2).
The text was updated successfully, but these errors were encountered: