package colibri2

  1. Overview
  2. Docs

Parameters

module D : sig ... end

Signature

type 'a key = 'a t
type ('a, 'b) data = ('a, 'b) D.t
type 'b t
val empty : 'b t
val is_empty : 'b t -> bool
val set_submap : 'a t -> 'b t -> bool
val singleton : 'a key -> ('a, 'b) data -> 'b t
val find : 'a key -> 'b t -> ('a, 'b) data

find x m returns the current binding of x in m, or raises Not_found if no such binding exists.

val find_def : ('a, 'b) data -> 'a key -> 'b t -> ('a, 'b) data
val find_opt : 'a key -> 'b t -> ('a, 'b) data option
val find_exn : exn -> 'a key -> 'b t -> ('a, 'b) data
val add : 'a key -> ('a, 'b) data -> 'b t -> 'b t

add x y m returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val change : (('a, 'b) data option -> ('a, 'b) data option) -> 'a key -> 'b t -> 'b t
val add_change : ('c -> ('a, 'b) data) -> ('c -> ('a, 'b) data -> ('a, 'b) data) -> 'a key -> 'c -> 'b t -> 'b t
type 'b union = {
  1. union : 'a. 'a key -> ('a, 'b) data -> ('a, 'b) data -> ('a, 'b) data option;
}
val union : 'b union -> 'b t -> 'b t -> 'b t
type ('b, 'c) fold2_inter = {
  1. fold2_inter : 'a. 'a key -> ('a, 'b) data -> ('a, 'b) data -> 'c -> 'c;
}
val fold2_inter : ('b, 'c) fold2_inter -> 'b t -> 'b t -> 'c -> 'c
type 'b iter = {
  1. iter : 'a. 'a key -> ('a, 'b) data -> unit;
}
val iter : 'b iter -> 'b t -> unit
type ('b, 'c) fold = {
  1. fold : 'a. 'c -> 'a key -> ('a, 'b) data -> 'c;
}
val fold : ('b, 'c) fold -> 'c -> 'b t -> 'c
type 'b mapi = {
  1. mapi : 'a. 'a key -> ('a, 'b) data -> ('a, 'b) data;
}
val mapi : 'b mapi -> 'b t -> 'b t
type printk = {
  1. printk : 'a. 'a key Containers.Format.printer;
}
type 'b printd = {
  1. printd : 'a. 'a key -> ('a, 'b) data Containers.Format.printer;
}
val pp : unit Containers.Format.printer -> unit Containers.Format.printer -> printk -> 'b printd -> 'b t Containers.Format.printer
OCaml

Innovation. Community. Security.