module Hashconsing_tbl_weak:Hashconsing_tbl
Weak hashtbl dedicated to hashconsing. Note that the resulting table is not saved on disk.
include State_builder.S
Hashtbl are a standard computation.
BUT it is INCORRECT to use projectified hashtables if keys have a
custom rehash function (see Project.DATATYPE_OUTPUT.rehash)
type data
val merge : data -> datamerge x returns an instance of x found in the table if any, or else
adds x and return x.
val add : data -> unitadd x adds x to the table. If there is already an instance of x,
it is unspecified which one will be returned by subsequent calls to
find and merge.
val clear : unit -> unitClear the table.
val count : unit -> intLength of the table.
val iter : (data -> unit) -> unitval fold : (data -> 'a -> 'a) -> 'a -> 'aval find : data -> datafind x returns an instance of x found in table.
@Raise Not_found if there is no such element.
val find_all : data -> data listfind_all x returns a list of all the instances of x found in t.
val mem : data -> boolmem x returns true if there is at least one instance of x in the
table, false otherwise.
val remove : data -> unitremove x removes from the table one instance of x. Does nothing if
there is no instance of x.