Module Indexing.Gensym

Gensym() creates an open-ended type-level set, whose cardinality is not known a priori. As long as the cardinal of the set has not been observed by invoking cardinal, new elements can be added to the set by invoking fresh.

Parameters

Signature

The type-level name n of the set and its cardinal n.

include CARDINAL
type n
val n : n cardinal
val fresh : unit -> n index

If cardinal n has not been invoked yet, then fresh() adds a new element to the set. Otherwise, calling fresh is forbidden and causes a runtime failure.