package core_unix

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module S.SpanSource

Sourcetype t
include Core.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
Sourceval bin_size_t : t Bin_prot.Size.sizer
Sourceval bin_write_t : t Bin_prot.Write.writer
Sourceval bin_read_t : t Bin_prot.Read.reader
Sourceval __bin_read_t__ : (int -> t) Bin_prot.Read.reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

Sourceval bin_shape_t : Bin_prot.Shape.t
include Core.Comparable.S with type t := t
include Base.Comparable.S with type t := t
Sourceval (>=) : t -> t -> bool
Sourceval (<=) : t -> t -> bool
Sourceval (=) : t -> t -> bool
Sourceval (>) : t -> t -> bool
Sourceval (<) : t -> t -> bool
Sourceval (<>) : t -> t -> bool
Sourceval equal : t -> t -> bool
Sourceval min : t -> t -> t
Sourceval max : t -> t -> t
Sourceval ascending : t -> 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 : t -> t -> int
Sourceval between : t -> low:t -> high:t -> bool

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

Sourceval clamp_exn : t -> min:t -> max:t -> 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).

Sourceval clamp : t -> min:t -> max:t -> t Base__.Or_error.t
Sourcetype comparator_witness
Sourceval comparator : (t, comparator_witness) Base__.Comparator.comparator
Sourcemodule Replace_polymorphic_compare : Base.Comparable.Polymorphic_compare with type t := t
include Core.Comparable.With_zero with type t := t
include Base.Comparable.With_zero with type t := t
Sourceval is_positive : t -> bool
Sourceval is_non_negative : t -> bool
Sourceval is_negative : t -> bool
Sourceval is_non_positive : t -> bool
Sourceval sign : t -> Base__.Sign0.t

Returns Neg, Zero, or Pos in a way consistent with the above functions.

Sourceval validate_lbound : min:t Core.Maybe_bound.t -> t Validate.check
Sourceval validate_ubound : max:t Core.Maybe_bound.t -> t Validate.check
Sourceval validate_bound : min:t Core.Maybe_bound.t -> max:t Core.Maybe_bound.t -> t Validate.check
Sourceval validate_positive : t Validate.check
Sourceval validate_non_negative : t Validate.check
Sourceval validate_negative : t Validate.check
Sourceval validate_non_positive : t Validate.check
include Core.Hashable.S with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
Sourceval compare : t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S with type t := t
Sourceval hash_fold_t : t Base__Ppx_hash_lib.hash_fold
Sourceval hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
Sourcemodule Table : Core.Hashtbl.S with type key = t
Sourcemodule Hash_set : Core.Hash_set.S with type elt = t
include Core.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Core.Stringable.S with type t := t
Sourceval of_string : string -> t
Sourceval to_string : t -> string
Sourceval nanosecond : t
Sourceval microsecond : t
Sourceval millisecond : t
Sourceval second : t
Sourceval minute : t
Sourceval hour : t
Sourceval day : t
Sourceval of_ns : float -> t
Sourceval of_us : float -> t
Sourceval of_ms : float -> t
Sourceval of_sec : float -> t
Sourceval of_min : float -> t
Sourceval of_hr : float -> t
Sourceval of_day : float -> t
Sourceval to_ns : t -> float
Sourceval to_us : t -> float
Sourceval to_ms : t -> float
Sourceval to_sec : t -> float
Sourceval to_min : t -> float
Sourceval to_hr : t -> float
Sourceval to_day : t -> float
Sourceval zero : t
Sourceval (+) : t -> t -> t
Sourceval (-) : t -> t -> t
Sourceval abs : t -> t
Sourceval neg : t -> t
Sourceval scale : t -> float -> t
Sourceval (/) : t -> float -> t
Sourceval (//) : t -> t -> float
Sourceval to_proportional_float : t -> float

The only condition to_proportional_float is supposed to satisfy is that for all t1, t2 : t: to_proportional_float t1 /. to_proportional_float t2 = t1 // t2.

Sourceval to_short_string : t -> string
Sourceval to_string_hum : ?delimiter:char -> ?decimals:int -> ?align_decimal:bool -> ?unit_of_time:Core.Unit_of_time.t -> t -> string
Sourceval randomize : t -> percent:Core.Percent.t -> t
Sourceval to_unit_of_time : t -> Core.Unit_of_time.t
Sourceval of_unit_of_time : Core.Unit_of_time.t -> t