package logtk

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

Module Logtk.HashSource

Hashing Combinators (for hashconsing)

A compositional interface for hashing values of type 'a by providing a 'a -> int function. Hashing composite structures is done by combining the hashes of individual components using combine or combine2; Helpers for hashing lists, options, arrays, tuples, etc. are provided.

Sourcetype 'a t = 'a -> int
Sourceval bool : bool t
Sourceval int : int t
Sourceval string : string t
Sourceval combine : 'a t -> int -> 'a -> int
Sourceval pair : 'a t -> 'b t -> ('a * 'b) t
Sourceval opt : 'a t -> 'a option t
Sourceval list : 'a t -> 'a list t
Sourceval array : 'a t -> 'a array t
Sourceval seq : 'a t -> 'a Iter.t t

Orderless versions

Sourceval list_comm : 'a t -> 'a list t
Sourceval array_comm : 'a t -> 'a array t
Sourceval combine2 : int -> int -> int
Sourceval combine3 : int -> int -> int -> int
Sourceval combine4 : int -> int -> int -> int -> int
Sourceval combine5 : int -> int -> int -> int -> int -> int
Sourceval poly : 'a t

the regular polymorphic hash function

OCaml

Innovation. Community. Security.