package store-dict

  1. Overview
  2. Docs
Snapshottable dictonaries and hashtables

Install

dune-project
 Dependency

Authors

Maintainers

Sources

store-v0.2.tar.bz2
sha512=42d6c7a850a7ac113c5470d6ebe9b5a160a9aa57d009b7eda17a14cda5a54a1dcecd146281322da70579bab08ede70ebe23aa5c48cc3ad3c2c90098424fafbb7

doc/store-dict/Store_Dict/index.html

Module Store_DictSource

Store_Dict exposes a functor Make to define custom snapshottable dictionaries, on top of any user-provided implementation of an associative data structure.

We also provide a Hashtbl which is an instance of Make on the standard-library Hashtbl module.

Sourcemodule type S = sig ... end

Store_Dict.S describes the signature that is expected from the associative data structure you want to use. It is a subset of the standard library's Hashtbl.S for convenience.

Sourcemodule Make (D : S) : sig ... end

Provided an implementation of mutable associative maps satisfying the signature Store_Dict.S, the functor Store_Dict.Make builds a stored associative map. It exposes the same operations as S, but they take an additional store argument to support backtracking.

Sourcemodule Hashtbl : sig ... end

Hashtbl is a store-indexed version of the polymorphic hashtables of the standard library's Hashtbl module.

Sourcemodule type S2 = sig ... end

S2 is a more polymorphic version of the interface S, where keys live in a parametrized type. It can be instantiated to get a monomorphic container interface with S2 with 'k key = foo, or polymorphic container interface with S2 with 'k key = 'k.

Sourcemodule Make2 (D : S2) : sig ... end

See the documentation of Make for more details on the interface.