type 'a t = 'a Base.Maybe_bound.t =
| Incl of 'a
| Excl of 'a
| Unbounded
include Bin_prot.Binable.S1 with type 'a t := 'a t
val bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
include module type of sig ... end with type 'a Maybe_bound.t := 'a t
include module type of Base.Maybe_bound with type 'a t := 'a t
val all : 'a list -> 'a t list
include Base.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val map : 'a t -> f:('a -> 'b) -> 'a t
val is_lower_bound : 'a t -> of_:'a -> compare:('a -> 'a -> int) -> bool
val is_upper_bound : 'a t -> of_:'a -> compare:('a -> 'a -> int) -> bool
val interval_contains_exn : lower:'a t -> upper:'a t -> 'a -> compare:('a -> 'a -> int) -> bool
interval_contains_exn ~lower ~upper x ~compare
raises iflower
andupper
are crossed.
val bounds_crossed : lower:'a t -> upper:'a t -> compare:('a -> 'a -> int) -> bool
bounds_crossed ~lower ~upper ~compare
returns true iflower > upper
.It ignores whether the bounds are
Incl
orExcl
.
val sexp_of_interval_comparison : interval_comparison -> Base.Sexp.t
val interval_comparison_of_sexp : Base.Sexp.t -> interval_comparison
val compare_interval_comparison : interval_comparison -> interval_comparison -> int
val hash_fold_interval_comparison : Base.Hash.state -> interval_comparison -> Base.Hash.state
val hash_interval_comparison : interval_comparison -> Base.Hash.hash_value
val compare_to_interval_exn : lower:'a t -> upper:'a t -> 'a -> compare:('a -> 'a -> int) -> interval_comparison
compare_to_interval_exn ~lower ~upper x ~compare
raises iflower
andupper
are crossed.
module As_lower_bound : sig ... end
Compares
t
values as lower bounds, whereUnbounded
is lowest,Incl x < Excl x
, and other cases ofIncl
and/orExcl
are compared based on'a
. IfAs_lower_bound.compare compare t1 t2 <= 0
andis_lower_bound t2 ~of_:a ~compare
, thenis_lower_bound t1 ~of_:a ~compare
. For example, forint As_lower_bound.t
:
module As_upper_bound : sig ... end
Compares
t
values as upper bounds, whereUnbounded
is highest,Incl x > Excl x
, and other cases ofIncl
and/orExcl
are compared based on'a
. IfAs_upper_bound.compare compare_a t1 t2 <= 0
andis_upper_bound t1 ~of_:a ~compare
, thenis_upper_bound t2 ~of_:a ~compare
. For example, forint As_upper_bound.t
:
module Stable : sig ... end