Comparer.Apply
Apply (F) (A)
takes a type ('a, 'compare_a) F.t
with a type parameter 'a
and a compare type 'compare_a
for 'a
, and a comparer A
, and creates a comparer for F.t
with 'a
instantiated to A.t
.
module F : sig ... end
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include S with type t := t with type compare = A.compare F.compare
type ('a, 'compare_a) comparer := ('a, 'compare_a) t
compare
types are equipped with functions to support use of @@deriving compare, equal, sexp
on types parameterized by such singleton types for compare functions. These derived functions are never actually called, since the compare type parameters are phantom.
val sexp_of_compare : compare -> Sexplib0.Sexp.t
val compare_of_sexp : Sexplib0.Sexp.t -> compare