package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'witness) t = private ('a, 'witness) Base.Comparator.t = {
  1. compare : 'a -> 'a -> Base.Int.t;
  2. sexp_of_t : 'a -> Sexplib.Sexp.t;
}
include module type of Base.Comparator with type ('a, 'witness) t := ('a, 'witness) t
type ('a, 'b) comparator = ('a, 'b) t
module type S = Comparator.S
module type S1 = Comparator.S1
module type S_fc = Comparator.S_fc
val make : compare:('a -> 'a -> int) -> sexp_of_t:('a -> Base.Sexp.t) -> (module S_fc with type comparable_t = 'a)

make creates a comparator witness for the given comparison. It is intended as a lightweight alternative to the functors below, to be used like so: include (val Comparator.make ~compare ~sexp_of_t)

module Poly = Base.Comparator.Poly
module S_to_S1 = Base.Comparator.S_to_S1
module Make = Base.Comparator.Make

Make creates a comparator value and its phantom comparator_witness type for a nullary type.

module Make1 = Base.Comparator.Make1

Make1 creates a comparator value and its phantom comparator_witness type for a unary type. It takes a compare and sexp_of_t that have non-standard types because the Comparator.t type doesn't allow passing in additional values for the type argument.

module Stable : sig ... end
OCaml

Innovation. Community. Security.