Go to the Next or Previous section, the Detailed Contents, or the FS(E)L Home Page.


A.3 Types

A.3.1 Simple types

Types are associated at a fundamental level with the set of elements that the type contains. Type expressions can occur only as part of the definition of channels or other types, but the name of a type can be used anywhere that a set is required.

For example, the type of integer values is Int and the type of boolean values is Bool, so

{0..3} <= Int
{true, false} == Bool

In type expressions the tuple syntax denotes a product type and the dot operation denotes a composite type so that

({0,1},{2,3}) denotes {(0,2),(0,3),(1,2),(1,3)}
{0,1}.{2,3} denotes {0.2, 0.3, 1.2, 1.3}

The Set and Seq functions which return the powerset and sequence-space of their arguments are also useful in type expressions.


Go to the Next or Previous section, the Detailed Contents, or the FS(E)L Home Page.