dreixel / generic-deriving

BSD 3-Clause "New" or "Revised" License
44 stars 32 forks source link

Build failure with template-haskell-2.21 (GHC 9.8) #93

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago

Build fails with template-haskell-2.21; there is already a patch in head.hackage: https://gitlab.haskell.org/ghc/head.hackage/-/blob/master/patches/generic-deriving-1.14.4.patch

[15 of 22] Compiling Generics.Deriving.TH.Internal ( src/Generics/Deriving/TH/Internal.hs, dist/build/Generics/Deriving/TH/Internal.o, dist/build/Generics/Deriving/TH/Internal.dyn_o )

src/Generics/Deriving/TH/Internal.hs:190:19: error: [GHC-83865]
    • Couldn't match type ‘BndrVis’ with ‘()’
      Expected: [TyVarBndr_ ()]
        Actual: [TyVarBndr BndrVis]
    • In the first argument of ‘Just’, namely ‘bndrs’
      In the expression: Just bndrs
      In a case alternative:
          FamilyI (OpenTypeFamilyD (TypeFamilyHead _ bndrs _ _)) _
            -> Just bndrs
    |
190 |           -> Just bndrs
    |                   ^^^^^

src/Generics/Deriving/TH/Internal.hs:201:19: error: [GHC-83865]
    • Couldn't match type ‘BndrVis’ with ‘()’
      Expected: [TyVarBndr_ ()]
        Actual: [TyVarBndr BndrVis]
    • In the first argument of ‘Just’, namely ‘bndrs’
      In the expression: Just bndrs
      In a case alternative:
          FamilyI (ClosedTypeFamilyD (TypeFamilyHead _ bndrs _ _) _) _
            -> Just bndrs
    |
201 |           -> Just bndrs
    |                   ^^^^^
RyanGlScott commented 1 year ago

I've uploaded generic-deriving-1.14.5 to Hackage with a fix.