Skip to content
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

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

Closed
Tracked by #14
andreasabel opened this issue Aug 1, 2023 · 2 comments · Fixed by #1046
Closed
Tracked by #14

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

andreasabel opened this issue Aug 1, 2023 · 2 comments · Fixed by #1046
Assignees

Comments

@andreasabel
Copy link

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

@RyanGlScott
Copy link
Collaborator

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.

RyanGlScott added a commit that referenced this issue Aug 22, 2023
This is made quite simple by using the `TyVarBndrVis`/`bndrVis` compatibility
shims from `th-abstraction-0.6.*`. When that version of `th-abstraction` is not
available, I provide these definitions using CPP.

Fixes #1043.
RyanGlScott added a commit that referenced this issue Aug 22, 2023
This is made quite simple by using the `TyVarBndrVis`/`bndrVis` compatibility
shims from `th-abstraction-0.6.*`. When that version of `th-abstraction` is not
available, I provide these definitions using CPP.

Fixes #1043.
RyanGlScott added a commit that referenced this issue Aug 24, 2023
This is made quite simple by using the `TyVarBndrVis`/`bndrVis` compatibility
shims from `th-abstraction-0.6.*`. When that version of `th-abstraction` is not
available, I provide these definitions using CPP.

Fixes #1043.
@RyanGlScott
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants