[GHC] #10114: Kind mismatches with AnyK in rank-2 types
GHC
ghc-devs at haskell.org
Wed Apr 8 11:55:36 UTC 2015
#10114: Kind mismatches with AnyK in rank-2 types
-------------------------------------+-------------------------------------
Reporter: cam | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
NB the [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide
/kind-polymorphism.html rule for kind generalisation in 7.8.2 of the user
manual].
{{{
f1 :: (forall a. Proxy a) -> Int -- Means f :: forall k. (forall
(a:k). Proxy k a) -> Int
f2 :: (forall (a::k). Proxy a) -> Int -- Means f :: (forall k. forall
(a:k). Proxy k a) -> Int
}}}
(Richard's new branch, which collapses types and kinds, allows explicit
kind quantification, so we can then control this more explicitly.)
So maybe the same should be true for `T`:
{{{
type T = forall f a. f a -- Means type T k = forall (f::k->*)
(a::k). f a
type T = forall f (a::k). f a -- Means type T = forall k (f::k->*)
(a::k). f a
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10114#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list