= Kind Annotations = == Brief explanation == In Haskell 98, each type constructor and variable has a kind. Though the Report uses a notation for kinds, they do not appear in Haskell source. GHC permits types and new type constructors and variables to be annotated with a kind signature, e.g. {{{ type T (f :: * -> *) = f Int }}} == References == * [http://www.haskell.org/onlinereport/decls.html#sect4.1.1 Kinds] in the Haskell 98 report * [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#sec-kinding Explicitly-kinded quantification] in the GHC User's Guide == Tickets == [[TicketQuery(description~=KindAnnotations)]] == Pros == * Allows more machine-checked documentation. * Haskell 98 defaults kinds to `*`, which is a nuisance if you want a higher kind. Kind annotations remove the need for awkward workarounds like dummy data constructors. See KindInference for alternative solutions to this problem. == Cons == * con == Proposal == To adopt explicit kind annotations as part of the language, more or less exactly as GHC permits.