Module Core_kernel.Univ_map
Universal/heterogeneous maps, useful for storing values of arbitrary type in a single map.
In order to recover a value, it must be looked up with exactly the Key.t it was stored in. In other words, given different Key.ts from the same string, one will not be able to recover the key stored in the other one.
This is similar to Univ in spirit.
include module type of Core_kernel__.Univ_map_intf
module Key = Type_equal.Idmodule type S = sig ... endmodule type S1 = sig ... endinclude S with type 'a S.data = 'a
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val invariant : t Base__.Invariant_intf.invval empty : tval is_empty : t -> Core_kernel__.Import.boolval set : t -> 'a Key.t -> 'a data -> tval mem : t -> 'a Key.t -> Core_kernel__.Import.boolval mem_by_id : t -> Key.Uid.t -> Core_kernel__.Import.boolval find : t -> 'a Key.t -> 'a data Core_kernel__.Import.optionval find_exn : t -> 'a Key.t -> 'a dataval add : t -> 'a Key.t -> 'a data -> [ `Duplicate | `Ok of t ]val add_exn : t -> 'a Key.t -> 'a data -> tval change : t -> 'a Key.t -> f:('a data Core_kernel__.Import.option -> 'a data Core_kernel__.Import.option) -> tval change_exn : t -> 'a Key.t -> f:('a data -> 'a data) -> tval update : t -> 'a Key.t -> f:('a data Core_kernel__.Import.option -> 'a data) -> tval remove : t -> 'a Key.t -> tval remove_by_id : t -> Key.Uid.t -> t
module Packed : sig ... endval to_alist : t -> Packed.t Core_kernel__.Import.listval of_alist_exn : Packed.t Core_kernel__.Import.list -> t
module With_default : sig ... endkeys with associated default values, so that
findis no longer partial
module With_fold : sig ... endkeys that map to an accumulator value with an associated fold operation
module Multi : sig ... endlist-accumulating keys with a default value of the empty list