Abstract

Key module.

| This module specifies what key needs to be defined for it to be used in data structures which use hash functions, such as mk_hashmap..

Synopsis

module type hashkey = {
type~ ctx
type key
type uint
val m: i64
val (==): (ctx, key) -> (ctx, key) -> bool
val hash: ctx -> [m]uint -> key -> uint
}

Description

↑module type hashkey
↑type~ ctx

Context type.

↑type key

Key type.

↑type uint

The hash type

↑val m: i64

Number constants the hash function is depended on.

↑val ==: (ctx, key) -> (ctx, key) -> bool

Equality definition for the key.

↑val hash: ctx -> [m]uint -> key -> uint

A given hash function use.