[GHC] #6093: Kind polymorphism fails with recursive type definition using different kind
GHC
cvs-ghc at haskell.org
Tue May 22 19:05:11 CEST 2012
#6093: Kind polymorphism fails with recursive type definition using different kind
----------------------------------------+-----------------------------------
Reporter: Ashley Yakeley | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* cc: goldfire, dreixel (added)
Comment:
Hmm. So you want to get the following type and kind signatures (where I
put in all kind abstractions and applications):
{{{
Type :: forall k. k -> *
SimpleType :: forall (a:*). IOWitness a -> Type * a
ConstructedType :: forall k k2. forall (f:k2->k) (a:k2).
Type (k2->k) g -> Type k2 a -> Type k (f a)
}}}
But there's a difficulty with `SimpleType` because data constructors must
have competely parameteric result types. I think you really want
{{{
SimpleType :: forall k. (k ~ *) => forall (a:k). IOWitness a -> Type k a
}}}
I'm a bit out of my depth here, but Stephanie and Richard have been
working on this kind of stuff so I'm ccing them.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6093#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list