Module Type_equal.Id

include module type of sig ... end
type 'a t
val sexp_of_t : ('a -> Base.Sexp.t) -> 'a t -> Base.Sexp.t
module Uid : sig ... end

Every Id.t contains a unique id that is distinct from the Uid.t in any other Id.t.

val uid : _ t -> Uid.t
val create : name:string -> ('a -> Base.Sexp.t) -> 'a t

create ~name defines a new type identity. Two calls to create will result in two distinct identifiers, even for the same arguments with the same type. If the type 'a doesn't support sexp conversion, then a good practice is to have the converter be [%sexp_of: _], (or sexp_of_opaque, if not using ppx_sexp_conv).

val hash : _ t -> int
val name : _ t -> string
val to_sexp : 'a t -> 'a -> Base.Sexp.t
val hash_fold_t : Base.Hash.state -> _ t -> Base.Hash.state
val same : _ t -> _ t -> bool
val same_witness : 'a t -> 'b t -> ('a'b) Base__Type_equal.t option
val same_witness_exn : 'a t -> 'b t -> ('a'b) Base__Type_equal.t
module Uid : sig ... end