Module Datatype_sig.Conv

When a type t can be converted (ideally with an injection to B1.t), we can define its oprations in terms of those of B1

Parameters

module B1 : S
module C : sig ... end

Signature

type t = C.t
val equal : t -> t -> bool

Any notion of equality is allowed, as long as it is an equivalence relation, and that if a == b, then equal a b.

val compare : t -> t -> int

compare is a total order, and should be compatible with equal.

val hash : t -> int

hash requires that equal values have the same hash.

val pretty : Stdlib.Format.formatter -> t -> unit