1Hashtbl.HashedType(3)            OCaml library           Hashtbl.HashedType(3)
2
3
4

NAME

6       Hashtbl.HashedType - The input signature of the functor Hashtbl.Make.
7

Module type

9       Module type   Hashtbl.HashedType
10

Documentation

12       Module type HashedType
13        = sig end
14
15
16       The input signature of the functor Hashtbl.Make .
17
18
19
20
21
22       type t
23
24
25       The type of the hashtable keys.
26
27
28
29       val equal : t -> t -> bool
30
31       The equality predicate used to compare keys.
32
33
34
35       val hash : t -> int
36
37       A  hashing function on keys. It must be such that if two keys are equal
38       according to equal , then they have identical hash values  as  computed
39       by  hash .  Examples: suitable ( equal , hash ) pairs for arbitrary key
40       types include
41
42       -        ( (=) , Hashtbl.hash )  for  comparing  objects  by  structure
43       (provided objects do not contain floats)
44
45       -         ( (fun x y -> compare x y = 0) , Hashtbl.hash ) for comparing
46       objects by structure and handling nan correctly
47
48       -        ( (==) , Hashtbl.hash )  for  comparing  objects  by  physical
49       equality (e.g. for mutable or cyclic objects).
50
51
52
53
54
55
56OCamldoc                          2020-09-01             Hashtbl.HashedType(3)
Impressum