CADiZ

Reference manual / Non-standard extensions to Z / Type constrained generics


Type constrained generics are intended as a step towards allowing schema calculus operators to be explicitly definable.

The formal parameter list of a generic definition can indicate which of its generic parameters must be schemas. A \dagger symbol separates those to its right that must be schemas from those to its left that must be sets.

Formals = [ NAME , { ,-tok , NAME } ] , [ \dagger , NAME , { ,-tok , NAME } ] ;

The constraints themselves are inferred from the form of the generic definition.


IT 4-Jan-2002