Happy and `haskell-src-exts` differ by shift/reduce conflicts
- Dominant language
- Haskell
- Stars
- 322
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
Hello.
`haskell-src-exts-1.23.1` fails to build with new `happy-2.2.1`:
```
unused rules: 3
The grammar has 12 shift/reduce conflicts.
This is different from the number given in the expect directive
Error: [Cabal-7125]
Failed to build haskell-src-exts-1.23.1 (which is required by hs-src-exts-happy-0.1.0.0). See the build log above for details.
```
My _guess_ is that this difference comes from [this](https://github.com/haskell/happy/commit/98f6a8eb9fea5c856bbd3f31fbbe3d977083c4ca) new commit, whereas `haskell-src-exts` currently [expects 13](https://github.com/haskell-suite/haskell-src-exts/blob/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/src/Language/Haskell/Exts/InternalParser.ly#L320):
```haskell
> %expect 13
```
I documented this on a repo [here](https://github.com/tbidne/hs-src-exts-happy), where the old index-state chooses older `happy-2.2` (ok), but the newer index-state chooses `happy-2.2.1` (fails). Incidentally, it would be nice if there was a way to force the older `happy` even with the newer index state e.g.
```
constraints: happy <2.2.1
```
But this doesn't seem to work for `Build-Tools` (and, I guess, `build-tool-depends`).
EDIT: Looks like this works:
```
constraints: any.happy <2.2.1
```
I'm not sure what should be done here e.g. this seems like it is probably a bug on `haskell-src-exts`. But I figured I'd make an issue here, since this may affect happy users more generally.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.