Changes between Version 31 and Version 32 of TypeFunctions
 Timestamp:
 Aug 1, 2006 6:40:57 PM (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

TypeFunctions
v31 v32 22 22 data T a1 .. an :: <kind> 23 23 }}} 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, with `n` >= 1. The `<kind>` can specify additional parametric parameters. Index variables can have a kind annotation. Indexed newtypes have the same form, except for the keyword. 25 25 * Kind signatures of type functions have the form 26 26 {{{ 27 27 type [iso] T a1 .. an :: <kind> 28 28 }}} 29 and introduce an `n`ary type functions, which may be of higherkind . 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.)29 and introduce an `n`ary type functions, which may be of higherkind, with `n` >= 1. 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.) 30 30 * 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.) 31 31 * 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 nonvariable type indexes in index positions. Type indexes can include applications of indexed data types and newtypes, but no type functions.