Changes between Version 30 and Version 31 of TypeFunctions


Ignore:
Timestamp:
Aug 1, 2006 5:33:51 PM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctions

    v30 v31  
    2222data T a1 .. an :: <kind> 
    2323}}} 
    24  and introduce a data type whose first {{{n}}} argument are indexes.  The {{{<kind>}}} can specify additional parametric parameters.   Index variables can have a kind annotation.  Indexed newtypes have the same form, except for the keyword. 
     24 and introduce a data type whose first `n` argument are indexes.  The `<kind>` can specify additional parametric parameters.   Index variables can have a kind annotation.  Indexed newtypes have the same form, except for the keyword. 
    2525 * Kind signatures of type functions have the form 
    2626 {{{ 
    2727type [iso] T a1 .. an :: <kind> 
    2828}}} 
    29  and introduce an {{{n}}}-ary type functions, which may be of higher-kind.  Again, the type variables can have kind signatures.  The modifier {{{iso}}} is optional and requires the type function to be injective. 
     29 and introduce an `n`-ary type functions, which may be of higher-kind.  Again, the type variables can have kind signatures.  The modifier `iso` is optional and requires the type function to be injective.  (In principle, we could make the `<kind>` optional, with `*` being the default, but we don't do that for uniformity with signatures of indexed types - the form `data T a1 .. an` is already used for empty data types.) 
    3030 * Applications of indexed types need to supply all indexes; i.e., partial application to indexes is not admitted.  (Arguments beyond the indexes can be partially supplied as usual.) 
    3131 * Instances of indexed data types/newtypes and equations of type functions have the same form as vanilla data types/newtypes and type synonyms, respectively, but can have non-variable type indexes in index positions.  Type indexes can include applications of indexed data types and newtypes, but no type functions.