Skip to content

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

Closed
@Vekhir

Description

@Vekhir

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
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions