#5862: Need kind annotations
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
In his [http://www.typesandotherdistractions.com/2012/02/fun-with-
xpolykinds-polykinded-folds.html blog post] Edward Kmett finds that he
needs kind annotations. In particular, he wants to be able to say this:
{{{
class Category (c :: k -> k -> *) where
type Ob c :: k -> Constraint
id :: Ob c a => c a a
(.) :: (Ob c a, Ob c b, Ob c c) => c b c -> c a b -> c a c
}}}
Note that the kind of `Ob` must match the kind of `c`, so to declare its
kind you need to mention the kind variable `k`, and that means `k` must be
in scope.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5862>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs