Module Fpath.Map

module Map: sig .. end

Path maps.


Path maps

include Map.S
val min_binding : 'a Fpath.t -> (Fpath.path * 'a) option

Exception safe Map.S.min_binding.

val get_min_binding : 'a Fpath.t -> Fpath.path * 'a

get_min_binding is like Fpath.Map.min_binding but

val max_binding : 'a Fpath.t -> (Fpath.path * 'a) option

Exception safe Map.S.max_binding.

val get_max_binding : 'a Fpath.t -> string * 'a

get_min_binding is like Fpath.Map.max_binding but

val choose : 'a Fpath.t -> (Fpath.path * 'a) option

Exception safe Map.S.choose.

val get_any_binding : 'a Fpath.t -> Fpath.path * 'a

get_any_binding is like Fpath.Map.choose but

val find : Fpath.path -> 'a Fpath.t -> 'a option

Exception safe Map.S.find.

val get : Fpath.path -> 'a Fpath.t -> 'a

get k m is like Map.S.find but raises Invalid_argument if k is not bound in m.

val dom : 'a Fpath.t -> Fpath.set

dom m is the domain of m.

val of_list : (Fpath.path * 'a) list -> 'a Fpath.t

of_list bs is List.fold_left (fun m (k, v) -> add k v m) empty bs.

val pp : ?sep:(Stdlib.Format.formatter -> unit -> unit) ->
(Stdlib.Format.formatter -> Fpath.path * 'a -> unit) ->
Stdlib.Format.formatter -> 'a Fpath.t -> unit

pp ~sep pp_binding ppf m formats the bindings of m on ppf. Each binding is formatted with pp_binding and bindings are separated by sep (defaults to Format.pp_print_cut). If the map is empty leaves ppf untouched.

val dump : (Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter -> 'a Fpath.t -> unit

dump pp_v ppf m prints an unspecified representation of m on ppf using pp_v to print the map codomain elements.