Module Records.Atom'

The abstract module representing condensed atoms.

type oty = Ty.t * bool
type t = {
  1. bindings : oty LabelMap.t;
  2. opened : bool;
  3. required : LabelSet.t option;
}

A compact representation for record types. The bindings and opened field have the same meaning as in Records.Atom.t. When the field required is equal to Some labels, it means that t requires at least one field not in labels to be present.

val dom : t -> LabelSet.t

dom t returns the set of explicit labels in t. Note that this does not mean that labels in dom t are present in the record values captured by t: even if a binding is present in t, it could be associated with a possibly absent type.

val find : Label.t -> t -> oty

find l t returns the type associated with the label l in t, even if t does not have an explicit binding for l.

val compare : t -> t -> int

Comparison working on the internal representation of t.

val equal : t -> t -> bool

Equality, equal a b is equivalent to compare a b = 0.