Changes between Version 2 and Version 3 of KindAnnotations


Ignore:
Timestamp:
Feb 2, 2006 11:56:24 AM (8 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • KindAnnotations

    v2 v3  
    11= Kind Annotations = 
    22 
    3 Ghc permits type expressions (or is it only type variables?) to be annotated with a kind signature.  See [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#sec-kinding this section] of the ghc user guide. 
     3== Brief explanation == 
    44 
     5In Haskell 98, each type constructor and variable has a kind. 
     6Though the Report uses a notation for kinds, they do not appear in Haskell source. 
     7 
     8GHC permits types and new type constructors and variables to be annotated with a kind signature, e.g. 
    59{{{ 
    610type T (f :: * -> *) = f Int 
    711}}} 
    812 
     13== References == 
     14 * [http://www.haskell.org/onlinereport/decls.html#sect4.1.1 Kinds] in the Haskell 98 report 
     15 * [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#sec-kinding Explicitly-kinded quantification] in the GHC User's Guide 
     16 
     17== Tickets == 
     18[[TicketQuery(description~=KindAnnotations)]] 
     19 
    920== Pros == 
    10  * Without the ability to write a kind signature, there are cases where one must introduce dummy data constructors purely for their effect in forcing a higher-kindedness on a type variable. 
     21 * Allows more machine-checked documentation. 
     22 * Haskell 98 defaults kinds to `*`, which is a nuisance if you want a higher kind. 
     23   Kind annotations remove the need for awkward workarounds like dummy data constructors. 
     24   See KindInference for alternative solutions to this problem. 
    1125 
    1226== Cons == 
     
    1529== Proposal == 
    1630 
    17 To adopt explicit kind annotations as part of the language, more or less exactly as ghc permits. 
    18 Ticket: #84 
     31To adopt explicit kind annotations as part of the language, more or less exactly as GHC permits.