Module Type.Id

Type identifiers (available in OCaml 5.1).

A type identifier is a value that denotes a type. Given two type identifiers, they can be tested for equality to prove they denote the same type. Note that:

Type identifiers

type !'a t

The type for identifiers for type 'a.

val make : unit -> 'a t

make () is a new type identifier.

val uid : 'a t -> int

uid id is a runtime unique identifier for id.

val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option

provably_equal i0 i1 is Some Equal if identifier i0 is equal to i1 and None otherwise.