Esqueleto fails to build with ghc 9.8.1
arguri opened this issue · 1 comments
arguri commented
Building esqueleto with ghc 9.8.1 fails with
src/Database/Esqueleto/Record.hs:272:20: error: [GHC-83865]
• Couldn't match type ‘BndrVis’ with ‘()’
Expected: [TyVarBndr ()]
Actual: [TyVarBndr BndrVis]
• In the ‘typeVarBinders’ field of a record
In the first argument of ‘pure’, namely ‘RecordInfo {..}’
In a stmt of a 'do' block: pure RecordInfo {..}
|
272 | pure RecordInfo {..}
| ^^
src/Database/Esqueleto/Record.hs:364:36: error: [GHC-83865]
• Couldn't match type ‘()’ with ‘BndrVis’
Expected: [TyVarBndr BndrVis]
Actual: [TyVarBndr ()]
• In the third argument of ‘DataD’, namely ‘typeVarBinders’
In the second argument of ‘($)’, namely
‘DataD
constraints sqlName typeVarBinders kind [newConstructor]
derivingClauses’
In a stmt of a 'do' block:
pure
$ DataD
constraints sqlName typeVarBinders kind [newConstructor]
derivingClauses
|
364 | pure $ DataD constraints sqlName typeVarBinders kind [newConstructor] derivingClauses
| ^^^^^^^^^^^^^^
src/Database/Esqueleto/Record.hs:741:41: error: [GHC-83865]
• Couldn't match type ‘()’ with ‘BndrVis’
Expected: [TyVarBndr BndrVis]
Actual: [TyVarBndr ()]
• In the third argument of ‘DataD’, namely ‘typeVarBinders’
In the second argument of ‘($)’, namely
‘DataD
constraints sqlMaybeName typeVarBinders kind [newConstructor]
derivingClauses’
In a stmt of a 'do' block:
pure
$ DataD
constraints sqlMaybeName typeVarBinders kind [newConstructor]
derivingClauses
|
741 | pure $ DataD constraints sqlMaybeName typeVarBinders kind [newConstructor] derivingClauses
| ^^^^^^^^^^^^^^
Error: cabal: Failed to build esqueleto-3.5.11.1.
I think adding
#if MIN_VERSION_template_haskell(2,18,0)
typeVarBinders :: [TyVarBndr BndrVis]
#elif MIN_VERSION_template_haskell(2,17,0)
typeVarBinders :: [TyVarBndr ()]
#else
typeVarBinders :: [TyVarBndr]
#endif
starting in line 217 solves the issue.
arguri commented
I think the PR fixed this.