Changes between Version 69 and Version 70 of TypeFunctions


Ignore:
Timestamp:
May 1, 2007 9:17:34 AM (8 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctions

    v69 v70  
    1515
    1616We also have notes on [wiki:TypeFunctionsSynTC type checking with indexed synonyms.]
     17
     18== Terminology ==
     19
     20
     21'''Data-type family''': a data type declared with a `data family`  or `newtype family` declaration.
     22
     23'''Type-synonym family''', or '''type function''': a type synonym declared with a `type family` declaration.
     24
     25'''Type family''': a data-type family or type-synonym family.
     26
     27'''Parametric type constructors''': Type constructors in vanilla Haskell.
     28
     29'''Family type constructor''' or '''Family `TyCon`''': the type constructor for a type family.
     30
     31'''Instance `TyCon`''': the `TyCon` arising from a `data instance` or `newtype instance` declaration.  Sometimes called the '''representation `TyCon`'''.  The instance `TyCon` is invisible to the programmer; it is only used internally inside GHC.  (NB: a `type instance` declaration does not give rise to a new `TyCon`.)
     32
     33'''Associated type''': A type family that is declared in a type class.
     34
     35'''Kind signature''': Declaration of the name, kind, and arity of an indexed type constructor.  The ''arity'' is the number of type indexes - ''not'' the overall number of parameters - of an indexed type constructor.
     36
     37'''Definitions vs. declarations''': We sometimes call the kind signature of an indexed constructor its ''declaration'' and the subsequent population of the type family by type equations or indexed data/newtype declarations the constructor's ''definition''.
    1738
    1839== Specification and Restrictions ==
     
    4869
    4970
    50 == Terminology ==
    51 
    52 '''Parametric type constructors''': Type constructors in vanilla Haskell.
    53 
    54 '''Indexed type constructors''': Type constructors that are defined via one or more type declarations that have non-variable parameters.  We often call them sloppily just ''indexed types''.  We informally call constructors that are not indexed ''vanilla'' constructors.
    55 
    56 '''Kind signature''': Declaration of the name, kind, and arity of an indexed type constructor.  The ''arity'' is the number of type indexes - ''not'' the overall number of parameters - of an indexed type constructor.
    57 
    58 '''Type function''': An indexed type synonym.
    59 
    60 '''Indexed data type''': An indexed type constructor declared with `data` or `newtype`.
    61 
    62 '''Associated type''': An indexed type that is declared in a type class.
    63 
    64 '''Type family''': Indexed types can be regarded as families of types; especially in the case of indexed data types, we call each declaration at a particular type index as ''member'' or ''element'' of that family.
    65 
    66 '''Definitions vs. declarations''': We sometimes call the kind signature of an indexed constructor its ''declaration'' and the subsequent population of the type family by type equations or indexed data/newtype declarations the constructor's ''definition''.
    67 
    6871
    6972== How It Works ==