Changes between Version 20 and Version 21 of KindSystem


Ignore:
Timestamp:
Oct 17, 2008 2:42:28 PM (7 years ago)
Author:
TristanAllwood
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • KindSystem

    v20 v21  
    193193== Auto Promotion of Types to Kinds ==
    194194
    195 Many simple data declarations it would be convinient to also have at the type level.  Assuming we resolve the TypeNaming and ambiguity issues above, we could support automatically deriving the data kind based on the data.
     195Many simple data declarations it would be convinient to also have at the type level.  Assuming we resolve TypeNaming and some ambiguity issues, we could support automatically deriving the data kind based on the data.
    196196
    197197There are some other issues to be wary of (care of Simon PJ):
     
    203203    }}}
    204204
    205     Automated lifting this would try and create a kind {{{Foo}}} with an associated type {{{Foo}}}.  But we've just declared a type {{{Foo}}} in the data declaration.
     205    Automated lifting this would try and create a kind {{{Foo}}} with type constructor {{{Foo}}}.  But we've just declared a type {{{Foo}}} in the data declaration.
    206206
    207207  * Automatic lifting of GADTs / existentials and parametric types is tricky until we have a story for them.
     
    230230#!text/x-haskell
    231231
    232 data Maybe a = Nothing | Just a
     232data Bool = True | False
    233233  deriving (Kind)
    234234
     
    239239
    240240{{{
    241 data and kind Maybe a = Nothing | Just a
     241data and kind Bool = True | False
    242242}}}
    243243
     
    314314=== Sort Signatures ===
    315315
    316 GHC currently allows users to specify simple kind signatures.  By allowing declaration of other kinds, and parameterisation of kinds, we will require kinds to have sorts.  Initially we may want to push everything up one layer, so our language of sorts is generated by the sort that classifies kinds {{{*}}}, or functions {{{sort -> sort}}}.
     316GHC currently allows users to specify simple kind signatures.  By allowing declaration of other kinds, and parameterisation of kinds, we will require kinds to have sorts.  Initially we may want to push everything up one layer, so our language of sorts is generated by the sort that classifies kinds {{{**}}}, or functions {{{sort -> sort}}}.
    317317
    318318This means we could allow explicit sort-signatures on kind arguments, e.g.:
    319 
    320319
    321320{{{