[GHC] #11635: Higher-rank kind in datatype definition rejected
GHC
ghc-devs at haskell.org
Wed Mar 23 11:55:49 UTC 2016
#11635: Higher-rank kind in datatype definition rejected
-------------------------------------+-------------------------------------
Reporter: phadej | Owner: goldfire
Type: bug | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: fixed | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHC rejects | Test Case:
valid program | dependent/should_compile/T11635
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: merge => closed
* failure: None/Unknown => GHC rejects valid program
* resolution: => fixed
* milestone: => 8.0.1
@@ -3,1 +3,1 @@
- {{{
+ {{{#!hs
New description:
Example program:
{{{#!hs
{-# LANGUAGE TypeInType, KindSignatures, ExplicitForAll #-}
import Data.Kind
data X (a :: forall k. k -> * ) = X
}}}
errors with
{{{
polykind.hs:3:1: error:
Expecting one more argument to ‘a’
Expected kind ‘k0’, but ‘a’ has kind ‘forall k. k -> *’
}}}
Without `TypeInType`, the error is better, yet gives false hint:
{{{
polykind.hs:3:23: error:
Illegal kind: forall k. k -> *
Did you mean to enable TypeInType?
}}}
---
For the record 7.10.3 doesn't recognise polymorphic kinds at all (same
program, without `Data.Kind` import):
{{{
polykind.hs:3:23: parse error on input ‘forall’
}}}
Which makes me think that polymorphic kinds are somehow supported, but
maybe not.
--
Comment:
Merged as bae60f654ac5d99834818da9c50ad4bee54c334e.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11635#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list