Enums represents sets of symbolic constants. These sets can be either finite or cofinite.
Basics
The minimal signature of a component.
The top element of t (the set of all values of type t).
The bottom element of t (the empty set of values of type t).
val compare : t -> t -> intComparison working on the internal representation of t.
val equal : t -> t -> boolEquality, equal a b is equivalent to compare a b = 0.
The explicit representation of an Enums.t is a pair of a boolean, and a list of constants. If the boolean is true, the set if finite and contains all the elements in the list. If the boolean is false, the set is co-finite and contains all the elements not in the list.
Operations on basic components
Creates a component from an atom.
val construct : (bool * Atom.t list) -> tBuilds a component from its explicit representation.
val destruct : t -> bool * Atom.t listReturns the explicit representation of component.