Types
In ALT there is no need for compile time type checking, as values and types are both the same thing. So typechecking in ALT is the same as running a program with bags of input values, as opposed to a single input value.
ALT may be the first programming language (except CUE) that has typechecking at runtime, whatever that means!
The following primitive values/types are available:
_
: any valuenumber
: all fraction intervals of infinite sizechar
: all character intervals of finite sizeboolean
: two boolean values,true
orfalse
null
: a singleton value!_
: not any value (none)
More complex structures can be created with the following compound values/types:
sequence
: an ordered sequence of values, specified by a regular expressionstring
: asequence
of char intervalslist
: a scoped array of values with a possible infinite tail.pair
: the product of two valuesstruct
: a scoped and ordered set of disjunctpair
s