package traits

  1. Overview
  2. Docs

Ord defines primitives for total order over type t

In order for a module to implement Ord, it has to conform to the T signature, which implies conformance to Ord.T

module type Trait = sig ... end

Ord implementation signature

module type T = sig ... end

Signature that defines Ord conformity

module Make (T : sig ... end) : sig ... end

Defines a default implementation of Trait over an existing PartialOrd.Trait definition

val cmp : (module T with type Ord.t = 'a) -> 'a0 -> 'a1 -> Ordering.t

Compares values x and y with module M and returns an ordering, left to right

OCaml

Innovation. Community. Security.