[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

A.3.4 Subtypes

Syntax

subtype U = A.{0,2} | C definition of subtype

Remarks

A subtype definition associates a name (U) with a subset of an existing type. The tags (A and C in the example) are assumed to have been defined as part of a datatype definition, with bodies which are supersets of those given in the subtype definition.

As with nametype, the same effect can be expressed by defining the type in terms of set comprehensions, but this can be less clear and less efficient.



Formal Systems (Europe) Ltd FDR2 Manual