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, and is indeed built on top of Univ.

type t
include Invariant.S with type t := t
val empty : t
val is_empty : t -> bool
module Key : module type of sig .. end
A key in a Univ_map is just a Type_equal.Id.
val set : t -> 'a Key.t -> 'a -> t
val mem : t -> 'a Key.t -> bool
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
val add : t -> 'a Key.t -> 'a -> [ `Duplicate | `Ok of t ]
val add_exn : t -> 'a Key.t -> 'a -> t
val change : t -> 'a Key.t -> ('a option -> 'a option) -> t
val change_exn : t -> 'a Key.t -> ('a -> 'a) -> t
module With_default : sig .. end
keys with associated default values, so that find is no longer partial
module Key : sig .. end
type 'a t
val create : default:'a -> name:string -> ('a -> Std_internal.Sexp.t) -> 'a t
val set : t -> 'a Key.t -> 'a -> t
val find : t -> 'a Key.t -> 'a
val change : t -> 'a Key.t -> ('a -> 'a) -> t
module With_fold : sig .. end
keys that map to an accumulator value with an associated fold operation
module Key : sig .. end
type ('a, 'b) t
val create : init:'b ->
f:('b -> 'a -> 'b) ->
name:string -> ('b -> Std_internal.Sexp.t) -> ('a, 'b) t
val set : t -> ('a, 'b) Key.t -> 'b -> t
val find : t -> ('a, 'b) Key.t -> 'b
val add : t -> ('a, 'b) Key.t -> 'a -> t
val change : t -> ('a, 'b) Key.t -> ('b -> 'b) -> t
module Multi : sig .. end
list-accumulating keys with a default value of the empty list
module Key : sig .. end
type 'a t
val create : name:string -> ('a -> Std_internal.Sexp.t) -> 'a t
val set : t -> 'a Key.t -> 'a list -> t
val find : t -> 'a Key.t -> 'a list
val add : t -> 'a Key.t -> 'a -> t
val change : t -> 'a Key.t -> ('a list -> 'a list) -> t
val sexp_of_t : t -> Sexplib.Sexp.t