Skip to content

Code using ConstraintKinds needs explicit kind signature with GHC 8.2.1

The attached module compiles without errors with GHC 8.0.1 but needs an explicit kind signature with GHC 8.2.1-rc2.

Mentioned in this ghc-dev thread.

Compiling the attached file fails gives the error:

[[1 of 1] Compiling CKBug            ( CKBug.hs, interpreted )

CKBug.hs:33:4: error:
    • Expected a type, but
      ‘(PropagIOConstraint l a,
        Missing (PropagIOVector l) (PropagIONullable l a),
        Elem (PropagIONullable l a) ~ a)’ has kind
      ‘Constraint’
    • In the type ‘((PropagIOConstraint l a,
                     Missing (PropagIOVector l) (PropagIONullable l a),
                     Elem (PropagIONullable l a) ~ a))’
      In the type declaration for ‘CanSerialize’
   |
33 |   (( PropagIOConstraint l a
   |    ^^^^^^^^^^^^^^^^^^^^^^^^...

CKBug.hs:42:4: error:
    • Expected a constraint,
        but ‘(CanSerialize l Double, CanSerialize l Int)’ has kind ‘*’
    • In the type ‘(CanSerialize l Double, CanSerialize l Int)’
      In the type declaration for ‘CanSerializePropagTypes’
   |
42 |    ( CanSerialize l Double
   |    ^^^^^^^^^^^^^^^^^^^^^^^...
Edited by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information