
#13742: Code using ConstraintKinds needs explicit kind signature with GHC 8.2.1 -------------------------------------+------------------------------------- Reporter: albertov | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler (Type | Version: 8.2.1-rc2 checker) | Keywords: Resolution: | ConstraintKinds, KindSignatures Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by RyanGlScott: @@ -6,0 +6,29 @@ + + 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 + | ^^^^^^^^^^^^^^^^^^^^^^^... + }}} New description: 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 [https://mail.haskell.org/pipermail/ghc- devs/2017-May/014222.html 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 | ^^^^^^^^^^^^^^^^^^^^^^^... }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13742#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler