Module Op.TupleComp

Operations on tuple types.

type t = TupleComp.t
val as_union : t -> atom list

as_union t expresses t as an union of non-empty atoms.

val of_union : int -> atom list -> t

of_union n atoms returns the n-uple component composed of the union atoms.

val approx : t -> atom

approx t over-approximates t as a non-empty atom.

val proj : int -> t -> Ty.t

proj n t returns the type resulting from the projection on the n-th component (0-indexed) of t.

  • raises Invalid_argument

    if n is negative or greater than the arity of t.

val merge : atom -> atom -> atom

merge t1 t2 returns the atom resulting from the concatenation of t1 and t2.