jon.recoil.org

Module Base.UnitSource

Module for the type unit.

Sourcetype t = unit
Sourceval all : Base.Unit.t list
Sourceval globalize : Base.Unit.t -> Base.Unit.t
include Sexplib0.Sexpable.S with type t := Base.Unit.t
include Base.Identifiable.S with type t := Base.Unit.t
include Base.Stringable.S with type t := Base.Unit.t
Sourceval of_string : string -> Base.Unit.t
Sourceval to_string : Base.Unit.t -> string
include Base.Comparable.S with type t := Base.Unit.t
include Base.Comparisons.S with type t := Base.Unit.t
include Base.Comparisons.Infix with type t := Base.Unit.t
Sourceval (>=) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval (<=) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval (=) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval (>) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval (<) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval (<>) : Base.Unit.t -> Base.Unit.t -> bool
Sourceval equal : Base.Unit.t -> Base.Unit.t -> bool
Sourceval compare : Base.Unit.t -> Base.Unit.t -> int

compare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.

Sourceval ascending : Base.Unit.t -> Base.Unit.t -> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

Sourceval descending : Base.Unit.t -> Base.Unit.t -> int
Sourceval between : Base.Unit.t -> low:Base.Unit.t -> high:Base.Unit.t -> bool

between t ~low ~high means low <= t <= high

Sourceval clamp_exn : Base.Unit.t -> min:Base.Unit.t -> max:Base.Unit.t -> Base.Unit.t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

include Base.Pretty_printer.S with type t := Base.Unit.t
include Base.Invariant.S with type t := Base.Unit.t
Sourceval invariant : Base.Unit.t -> unit