package colibri2

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Hash tables for hash consing

Hash consing tables are using weak pointers, so that values that are no more referenced from anywhere else can be erased by the GC.

Look in src/core/term.ml for usage examples.

Values to be hash-consed must implement signature HashedType below. Type t is the type of values to be hash-consed. The user must provide an equality and a hash function over type t, as well as a function tag to build a new value of type t from an old one and a unique integer tag.

module type HashedType = sig ... end
module type S = sig ... end
module Make (H : HashedType) : S with type t = H.t and type cat := unit
module MakeCat (H : sig ... end) : sig ... end
module MakeTag (H : sig ... end) : S with type t = H.t and type cat := unit
val combine : int -> int -> int
val combine2 : int -> int -> int -> int
val combine3 : int -> int -> int -> int -> int
val combine_list : ('a -> int) -> int -> 'a list -> int
val combine_option : ('a -> int) -> 'a option -> int
val combine_pair : ('a -> int) -> ('b -> int) -> ('a * 'b) -> int
OCaml

Innovation. Community. Security.