module Univ_map:sig..end
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
val empty : tval is_empty : t -> boolmodule Key:sig..end
val set : t -> 'a Key.t -> 'a -> tval mem : t -> 'a Key.t -> boolval find : t -> 'a Key.t -> 'a optionval find_exn : t -> 'a Key.t -> 'aval add : t -> 'a Key.t -> 'a -> [ `Duplicate | `Ok of t ]val add_exn : t -> 'a Key.t -> 'a -> tval change : t -> 'a Key.t -> ('a option -> 'a option) -> tval change_exn : t -> 'a Key.t -> ('a -> 'a) -> tmodule With_default:sig..end
find is no longer partial
module With_fold:sig..end
module Multi:sig..end
val sexp_of_t : t -> Sexplib.Sexp.tcreate name to_sexp generates a fresh key.
Note: If type 'a doesn't support sexp conversion, then a good
practice is to use sexp_of_opaque as the converter.find is no longer partial