package jhupllib

  1. Overview
  2. Docs

This module provides a means by which a registry of "witnesses" can be created. Here, a witness is a representative of another (typically more complex) value. A witness registry is a mutable structure which monotonically accumulates values, mapping distinct values to distinct witnesses. The primary use of such a registry is to accelerate comparison operations. For instance, using witnesses as keys in a tree-based dictionary may be faster than using the original values if the comparison between two values is an expensive operation.

module type Spec = sig ... end

This module type describes the information required to create a witness registry module.

module type Registry = sig ... end

This is the type of a witness registry module.

module Make (S : Spec) : Registry with type elt = S.t

A functor which creates witness registries.

module type Escorted_registry = sig ... end

The type of a registry with an escort. Escorts pair the witnesses with their registries to make operations such as pretty-printing easier. This module only defines escorts and their basic comparison operations. More operations can be added by including utils modules produced by the other functors in this module.

module Make_escorted (S : Spec) : Escorted_registry with type elt = S.t

A functor to make registries with escorts.

module type Pp_utils = sig ... end

The type of a pretty-printing utility module for witness registries.

A functor to produce a pretty-printing utility module.

module type To_yojson_utils = sig ... end

The type of a to-yojson utility module for witness registries.

A functor to produce a pretty-printing utility module.

OCaml

Innovation. Community. Security.