Library
Module
Module type
Parameter
Class
Class type
Compare
Monomorphic comparison for common ground types and common type constructors.
Compare
provides a module signature for the standard comparison functions and operators as well as modules of that signature for the common OCaml ground types (int
, bool
, etc.) and type constructors (list
, option
, etc.).
module type COMPARABLE = sig ... end
module type S = sig ... end
S
is a signature for a fully-fledge comparison module. It includes all the functions and operators derived from a compare
function.
The specialised comparison and all the specialised functions and operators on the base types are compatible with the polymorphic comparison and all the polymorphic functions and operators from the Stdlib
.
module Int : sig ... end
Provided the functor argument(s) are compatible with the polymorphic comparison of the Stdlib
, then the specialised comparison and all the specialised functions and operators on the derived types are compatible with the polymorphic comparison and all the polymorphic functions and operators from the Stdlib
.
module Result
(Ok : COMPARABLE)
(Error : COMPARABLE) :
S with type t = (Ok.t, Error.t) result