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 on GHC 9.8.1: 'Illegal invisible type variable binder' #2567

Open
Vekhir opened this issue Feb 18, 2024 · 0 comments
Open

Build failure on GHC 9.8.1: 'Illegal invisible type variable binder' #2567

Vekhir opened this issue Feb 18, 2024 · 0 comments

Comments

@Vekhir
Copy link
Contributor

Vekhir commented Feb 18, 2024

Hi,
when building dhall 1.42.1 on Arch Linux with GHC 9.8.1 and template-haskell 2.21.0.0, the following error occurs while building the tests:

tests/Dhall/Test/TH.hs:111:1: error: [GHC-58589]
    Illegal invisible type variable binder: @b0
    Suggested fix: Perhaps you intended to use TypeAbstractions
    |
111 | Dhall.TH.makeHaskellTypesWith (Dhall.TH.defaultGenerateOptions
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

The same error occurs 4 times (see Appendix). The error itself suggests to use TypeAbstractions to fix the issue.
The offending line is dhall/tests/Dhall/Test/TH.hs#L111, and the issue doesn't seem fixed on main.

template-haskell from 2.21 onwards supports Invisible binders in type declarations, see also the migration guide and GHC proposal #425.
dhall 1.42.1 advertises support for template-haskell 2.21 and GHC 9.8 - not sure what's going on there.

-- Vekhir

Appendix

[ 5 of 21] Compiling Dhall.Test.TH    ( tests/Dhall/Test/TH.hs, dist/build/tasty/tasty-tmp/Dhall/Test/TH.dyn_o )

tests/Dhall/Test/TH.hs:111:1: error: [GHC-58589]
    Illegal invisible type variable binder: @a0
    Suggested fix: Perhaps you intended to use TypeAbstractions
    |
111 | Dhall.TH.makeHaskellTypesWith (Dhall.TH.defaultGenerateOptions
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

tests/Dhall/Test/TH.hs:111:1: error: [GHC-58589]
    Illegal invisible type variable binder: @a1
    Suggested fix: Perhaps you intended to use TypeAbstractions
    |
111 | Dhall.TH.makeHaskellTypesWith (Dhall.TH.defaultGenerateOptions
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

tests/Dhall/Test/TH.hs:111:1: error: [GHC-58589]
    Illegal invisible type variable binder: @b0
    Suggested fix: Perhaps you intended to use TypeAbstractions
    |
111 | Dhall.TH.makeHaskellTypesWith (Dhall.TH.defaultGenerateOptions
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

tests/Dhall/Test/TH.hs:111:1: error: [GHC-58589]
    Illegal invisible type variable binder: @a0
    Suggested fix: Perhaps you intended to use TypeAbstractions
    |
111 | Dhall.TH.makeHaskellTypesWith (Dhall.TH.defaultGenerateOptions
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
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

No branches or pull requests

1 participant