-
Notifications
You must be signed in to change notification settings - Fork 84
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
ghc (and ghc-lib-parser-9.10.1.20240511) no longer builds with happy 2.0 #303
Comments
I couldn't test whether GHC proper is buildable with |
I meant that if GHC proper fails to build with But GHC proper is not buildable, I see
... so the something wrong with For the reference the rule looks like
but the generated code is
|
This looks like a breaking change caused by (undocumented in changelog) tab-to-spaces change. EDIT: one can fix that occurrence in GHC by not using layout: | 'pattern' pattern_synonym_lhs '<-' pat_syn_pat where_decls
- {% do { let (name, args, as) = $2
+ {% do { let { (name, args, as) = $2 }
; mg <- mkPatSynMatchGroup name $5 but there are more errors to fix. Arguably, using layout in |
Alright, so it's not a bug in a strict sense. |
I mean, |
It's generally a bad idea to use layout in happy-generated parsers. For example, That said, it's an unforced change and I'm unsure if increasing to 8 spaces will fix the problem. Although actually perhaps it will, given that 8 characters is the size of a tab stop prescribed by Haskell2010. |
2 spaces forced a breaking change on GHC. Fixes #303.
2 spaces forced a breaking change on GHC. Fixes #303.
2 spaces forced a breaking change on GHC. Fixes #303.
2 spaces forced a breaking change on GHC. Fixes #303.
Version 2.0 has been deprecated and 2.0.1 with the fix has been uploaded. @Tritlo, could you try again? |
Yes, it's working again. Thanks for the quick response! |
I know this is a downstream change, but since it is used across the ecosystem, I figured I would report it here (maybe it's a "happy" bug?). When installing fourmolu, which depends on
ghc-lib-parser
, I get the following error:Maybe the version bound is not tight enough in
ghc-lib-parser
? Anyway, seems like libraries that depend onhappy
are breaking 😓The text was updated successfully, but these errors were encountered: