Core_kernel.Source_code_position
This module extends Base.Source_code_position
.
include module type of struct include Base.Source_code_position end
See INRIA's OCaml documentation for a description of these fields.
sexp_of_t
uses the form "FILE:LINE:COL"
, and does not have a corresponding of_sexp
.
val sexp_of_t : t -> Base.Sexp.t
val to_string : t -> string
to_string t
converts t
to the form "FILE:LINE:COL"
.
val of_pos : (string * int * int * int) -> t
of_pos Caml.__POS__
is like [%here]
but without using ppx.
include Comparable.S with type t := t and type comparator_witness := comparator_witness
include Base.Comparable.S with type t := t with type comparator_witness := comparator_witness
include Base.Comparisons.S with type t := t
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.
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)
.
val clamp : t -> min:t -> max:t -> t Base.Or_error.t
include Base.Comparator.S with type t := t with type comparator_witness := comparator_witness
val comparator : (t, comparator_witness) Base.Comparator.comparator
val validate_lbound : min:t Base.Maybe_bound.t -> t Base.Validate.check
val validate_ubound : max:t Base.Maybe_bound.t -> t Base.Validate.check
val validate_bound : min:t Base.Maybe_bound.t -> max:t Base.Maybe_bound.t -> t Base.Validate.check
module Replace_polymorphic_compare : Base.Comparable.Polymorphic_compare with type t := t
module Map : Map.S with type Key.t = t with type Key.comparator_witness = comparator_witness
module Set : Set.S with type Elt.t = t with type Elt.comparator_witness = comparator_witness
include Hashable.S with type t := t
include Hashable.Common with type t := t
val compare : t -> t -> Base.Int.t
val hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
val hash : t -> Base.Hash.hash_value
val hashable : t Hashtbl.Hashable.t
module Hash_set : Hash_set.S with type elt = t
module Hash_queue : Hash_queue.S with type key = t
module Stable : sig ... end