Belt.IdProvide utilities to create identified comparators or hashes for data structures used below.
It create a unique identifier per module of functions so that different data structures with slightly different comparison functions won't mix
val getHashInternal : ('a, 'id) hash -> 'a -> intval getEqInternal : ('a, 'id) eq -> 'a -> 'a -> boolval getCmpInternal : ('a, 'id) cmp -> 'a -> 'a -> intmodule type Comparable = sig ... endtype ('key, 'id) comparable =
(module Comparable
with type identity = 'id
and type t = 'key)module MakeComparableU (M : sig ... end) : sig ... endmodule MakeComparable (M : sig ... end) : sig ... endval comparableU :
cmp:('key -> 'key -> int) ->
(module Comparable
with type t = 'key)val comparable :
cmp:('key -> 'key -> int) ->
(module Comparable
with type t = 'key)module type Hashable = sig ... endmodule MakeHashableU (M : sig ... end) : sig ... endmodule MakeHashable (M : sig ... end) : sig ... end