ekmett/lens

Build failure with `template-haskell-2.21` (GHC 9.8)

Closed this issue · 2 comments

src/Language/Haskell/TH/Lens.hs:763:33: error: [GHC-83865]
    • Couldn't match type ‘BndrVis’ with ‘()’
      Expected: TypeFamilyHead -> [TyVarBndrUnit]
        Actual: TypeFamilyHead -> [TyVarBndr BndrVis]
    • In the first argument of ‘lens’, namely ‘g’
      In the expression: lens g s
      In an equation for ‘typeFamilyHeadTyVarBndrs’:
          typeFamilyHeadTyVarBndrs
            = lens g s
            where
                g (TypeFamilyHead _ tvbs _ _) = tvbs
                s (TypeFamilyHead n _ rs ia) tvbs = TypeFamilyHead n tvbs rs ia
    |
763 | typeFamilyHeadTyVarBndrs = lens g s where
    |             
...

This could be fixed by using ideas from the patch on head.hackage: https://gitlab.haskell.org/ghc/head.hackage/-/blob/master/patches/lens-5.2.2.patch

Sorry for the delay on this—things always tend to become busy around a new GHC release. I'll plan to fix this within the coming days.

I've uploaded lens-5.2.3 to Hackage with a fix.