Changes between Version 66 and Version 67 of TypeFunctions
- Dec 29, 2006 8:20:26 PM (9 years ago)
v66 v67 36 36 * All argument variables of an associated type family declaration need to be class parameters. There may not be any repetitions, but the order of the variables can differ from that in the class head and the type family can be defined over a subset of the class parameters. 37 37 * In instances, the type indexes of a type declaration must be identical to the corresponding class parameters (i.e., those that share the same variable name in the class declaration). And all arguments that where not connected to a class parameter in the family declaration must be variables; i.e., cannot be used as type indexes. 38 * Type contexts (including super class and instance contexts) can have equational constraints of the form `t1 ?? t2`, where the two types `t1` and `t2` need to be rank 0 types. (FIXME: Infix operator to be determined!) 38 * Type contexts (including super class and instance contexts) can have equational constraints of the form `t1 39 39 * In an export and import list, associated types are treated as subcomponents of their type class, just like the class methods. In particular, `C(..)` denotes class `C` with all its methods and all its associated types. If the associated types of a class are explicitly listed in the parenthesis, each type name needs to be prefixed with the keyword `type`; i.e., to denote class `C` with associated type `T` and method `foo`, we write `C(type T, foo)`. 40 40 * In export and import lists, all data constructors of newtype and data families defined in any newtype or data instance is regarded to be a subcomponent of the family type constructor, and hence specified by `F(..)` if `F` is the family type constructor. Instead of specifying them all with "`..`", they can also be explicitly listed, just as with vanilla data types.