package fix

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

Module Numbering.ForHashedTypeSource

ForHashedType is a special case of Make where it suffices for keys to be hashed.

Parameters

Signature

Sourcetype t = T.t

The type t of values of interest.

Sourceval encode : t -> int

encode maps a value of type t to a unique integer code. If applied twice to the same value, encode returns the same code; if applied to a value that has never been encountered, it returns a fresh code.

Sourceval current : unit -> int

current() returns the next available code, which is also the number of values that have been encoded so far.

Sourceval has_been_encoded : t -> bool

has_been_encoded x determines whether the value x has been encoded already.

Sourcemodule Done () : sig ... end

The functor Done ends the numbering process.