Module Relude_Ordering

Contains functions and typeclass instances for the ordering type - the enum with inhabitants `less_than, `equal_to, and `greater_than.

Functions that deal with comparing values don't belong here - these go in Relude_Ord and Relude_Extensions_Ord. This module is just for working with values of type ordering.

type t = BsBastet.Interface.ordering;
let fromInt: int => t;

Ordering.fromInt converts an int to a type-safe ordering value. This can be helpful for working with other functions in the OCaml world that normally use -1 to indicate `less_than, 0 to indicate `equal_to, and 1 to indicate `greater_than.

let toInt: t => int;

Ordering.toInt converts a type-safe ordering value to an int. This is useful when working with OCaml libraries that expect -1 for less than, 0 for equal and 1 for greater than.

let reverse: t => t;

Ordering.reverse reverses the value of the ordering (`greater_than becomes `less_than and vice versa).

let eq: t => t => bool;

Ordering.eq compares two orderings for equality

module Eq: BsBastet.Interface.EQ with type Eq.t = t;
include { ... };
let eqWithConversion: ('b => Eq.t) => Relude_Eq.eq('b);
let notEq: Relude_Eq.eq(Eq.t);
let eqInverted: Relude_Eq.eq(Eq.t);
module EqInverted: { ... };
module type EQ_BY_F = (A: { ... }) => { ... };
module EqBy: (A: { ... }) => { ... };
let compare: t => t => t;

Ordering.compare ompares two orderings (`less_than < `equal_to < `greater_than).

module Ord: BsBastet.Interface.ORD with type Ord.t = t;
include { ... };
let compareWithConversion: ('b => Ord.t) => Relude_Ord.compare('b);
let compareReversed: Relude_Ord.compare(Ord.t);
module OrdReversed: { ... };
let compareAsInt: Ord.t => Ord.t => int;
let min: Ord.t => Ord.t => Ord.t;
let max: Ord.t => Ord.t => Ord.t;
let lessThan: Ord.t => Ord.t => bool;
let lt: Ord.t => Ord.t => bool;
let lessThanOrEq: Ord.t => Ord.t => bool;
let lte: Ord.t => Ord.t => bool;
let greaterThan: Ord.t => Ord.t => bool;
let gt: Ord.t => Ord.t => bool;
let greaterThanOrEq: Ord.t => Ord.t => bool;
let gte: Ord.t => Ord.t => bool;
let clamp: min:Ord.t => max:Ord.t => Ord.t => Ord.t;
let between: min:Ord.t => max:Ord.t => Ord.t => bool;
module OrdRingExtensions: (R: { ... }) => { ... };
module OrdNamed: { ... };
module type ORD_BY_F = (A: { ... }) => { ... };
module OrdBy: (A: { ... }) => { ... };
let top: [> `greater_than ];
let bottom: [> `less_than ];
module Bounded: BsBastet.Interface.BOUNDED with type Bounded.t = t;
include { ... };
let pred: t => option(t);
let succ: t => option(t);
module Enum: Relude_Interface.ENUM with type Enum.t = t;
include { ... };
let fromToAsList: start:Enum.t => finish:Enum.t => list(Enum.t);
let upFromAsList: Enum.t => list(Enum.t);
let upFromIncludingAsList: Enum.t => list(Enum.t);
let downFromAsList: Enum.t => list(Enum.t);
let downFromIncludingAsList: Enum.t => list(Enum.t);
module BoundedEnum: Relude_Interface.BOUNDED_ENUM with type BoundedEnum.t = t;
include { ... };
let fromThenToAsList: start:BoundedEnum.t => next:BoundedEnum.t => finish:BoundedEnum.t => list(BoundedEnum.t);