Ty.OOptional types are subsets of 𝟙\cup\bot. They are used for the type of record fields, to denote the fact that a field may be absent.
type t = node * boolThe type of optional types. Whenever the boolean component is true, it means that the type contains the undefined element \bot. Otherwise, when the boolean component is false, the type is equivalent to a plain Ty.t type.
val absent : tabsent is the singleton type containing the undefined value, \bot.
conj l is the intersection of all the types in l. It returns any if l is the empty list.
disj l is the union of all the types in l. It returns empty if l is the empty list.
val is_empty : t -> boolEmptyness test. is_empty t returns true if and only if t is semantically equivalent to empty.
val is_any : t -> boolFullness test. is_any t returns true if and only if t is semantically equivalent to any.
Subtyping test. leq t1 t2 returns true if and only if t1 is a subtype of t2.
Type equivalence test. equiv t1 t2 returns true if and only if leq t1 t2 and leq t2 t1.
Disjointedness test. disjoint t1 t2 returns true if and only if cap t1 t2 is empty.
val is_absent : t -> boolTests whether \bot \equiv t.
val is_required : t -> boolTests whether \bot \not\in t.
val is_optional : t -> boolTests whether \bot \in t