Module Glue.WeakHashTablesAsImperativeMaps

An implementation of imperative maps as a weak hash table. Use with caution: this table can forget some of its entries, and can therefore be unsuitable for use in some applications.


module H : sig ... end


type key = H.t

The type of keys.

type 'data t = 'data Stdlib.Ephemeron.K1.Make(H).t

The type of association maps.

val create : unit -> 'data t

create() creates a fresh empty map.

val add : key -> 'data -> 'data t -> unit

add inserts a new entry or replaces an existing entry. The map is updated in place.

val find : key -> 'data t -> 'data

find raises Not_found if the key is not in the domain of the map.