Module Core_kernel.Univ_map

Universal/heterogeneous maps.

These maps are 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.t's 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.Id
module type S : sig ... end
module type S1 : sig ... end
include S with type 'a S.data = 'a
type t
val sexp_of_t : t ‑> Sexplib.Sexp.t
type 'a data = 'a
val empty : t
val is_empty : t ‑> Core_kernel__.Import.bool
val set : t ‑> 'a Key.t ‑> 'a data ‑> t
val mem : t ‑> 'a Key.t ‑> Core_kernel__.Import.bool
val mem_by_id : t ‑> Key.Uid.t ‑> Core_kernel__.Import.bool
val find : t ‑> 'a Key.t ‑> 'a data Core_kernel__.Import.option
val find_exn : t ‑> 'a Key.t ‑> 'a data
val add : t ‑> 'a Key.t ‑> 'a data ‑> [ `Duplicate | `Ok of t ]
val add_exn : t ‑> 'a Key.t ‑> 'a data ‑> t
val change : t ‑> 'a Key.t ‑> f:('a data Core_kernel__.Import.option ‑> 'a data Core_kernel__.Import.option) ‑> t
val change_exn : t ‑> 'a Key.t ‑> f:('a data ‑> 'a data) ‑> t
val update : t ‑> 'a Key.t ‑> f:('a data Core_kernel__.Import.option ‑> 'a data) ‑> t
val remove : t ‑> 'a Key.t ‑> t
val remove_by_id : t ‑> Key.Uid.t ‑> t
module Packed : sig ... end
module Make : functor (Data : sig ... end) -> S with type 'a data = 'a Data.t
module Make1 : functor (Data : sig ... end) -> S1 with type ('s, 'a) data = ('s'aData.t
module With_default : sig ... end

keys with associated default values, so that find is no longer partial

module With_fold : sig ... end

keys that map to an accumulator value with an associated fold operation

module Multi : sig ... end

list-accumulating keys with a default value of the empty list