Core.Source_code_position
This module extends Base.Source_code_position
.
val sexp_of_t : Lexing.position -> Sexplib0.Sexp.t
include Base.Comparable.S with type t := Lexing.position
include Base.Comparisons.S with type t := Lexing.position
include Base.Comparisons.Infix with type t := Lexing.position
include Base.Comparator.S with type t := Lexing.position
type comparator_witness = Base.Source_code_position.comparator_witness
val equal__local : Lexing.position -> Lexing.position -> bool
val compare__local : Lexing.position -> Lexing.position -> int
val to_string : Lexing.position -> string
to_string t
converts t
to the form "FILE:LINE:COL"
.
val of_pos : (string * int * int * int) -> Lexing.position
of_pos Stdlib.__POS__
is like [%here]
but without using ppx.
val pos_cnum : t -> int
val pos_bol : t -> int
val pos_lnum : t -> int
val pos_fname : t -> string
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 Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Validate.check
val validate_bound :
min:t Maybe_bound.t ->
max:t Maybe_bound.t ->
t Validate.check
module Replace_polymorphic_compare :
Base.Comparable.Comparisons 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 Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
val hash : t -> Base.Hash.hash_value
val hashable : t Base.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