Module UnivGen.Supply

Generation of unification levels ℓn and sort variables αn. Their names are only unique relative to a given supply, typically the one of a UState.t: a supply must stay fresh w.r.t. all the unification levels and sort variables it may be mixed with.

type t
val empty : t
val fresh_level : t -> t * Univ.Level.t
val fresh_qvar : t -> t * Sorts.QVar.t
val union : t -> t -> t

Keeps the namespace of the first supply.

val namespace : t -> string
val set_namespace : string -> t -> t

The names of the levels and variables generated by the supply are in this namespace (by default, the empty one). The names generated in different namespaces never clash, even from the same indices.

val add_levels : Univ.Level.Set.t -> t -> t

Make the supply fresh w.r.t. these levels.

val add_qvars : Sorts.QVar.Set.t -> t -> t