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
val m: i64
val (==): (ctx, key) -> (ctx, key) -> bool
val hash: ctx -> [m]u64 -> key -> u64
}

Description

module type hashkey
type~ ctx

Context type.

type key

Key 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]u64 -> key -> u64

A given hash function use.