package melange

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

Belt.Id

Provide 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

type ('a, 'id) hash = ('a -> int) Js.Fn.arity1
type ('a, 'id) eq = ('a -> 'a -> bool) Js.Fn.arity2
type ('a, 'id) cmp = ('a -> 'a -> int) Js.Fn.arity2
val getHashInternal : ('a, 'id) hash -> ('a -> int) Js.Fn.arity1
val getEqInternal : ('a, 'id) eq -> ('a -> 'a -> bool) Js.Fn.arity2
val getCmpInternal : ('a, 'id) cmp -> ('a -> 'a -> int) Js.Fn.arity2
module type Comparable = sig ... end
type ('key, 'id) comparable = (module Comparable with type identity = 'id and type t = 'key)
module MakeComparableU (M : sig ... end) : sig ... end
module MakeComparable (M : sig ... end) : sig ... end
val comparableU : cmp:('key -> 'key -> int) Js.Fn.arity2 -> (module Comparable with type t = 'key0)
val comparable : cmp:('key -> 'key -> int) -> (module Comparable with type t = 'key0)
module type Hashable = sig ... end
type ('key, 'id) hashable = (module Hashable with type identity = 'id and type t = 'key)
module MakeHashableU (M : sig ... end) : sig ... end
module MakeHashable (M : sig ... end) : sig ... end
val hashableU : hash:('key -> int) Js.Fn.arity1 -> eq:('key0 -> 'key0 -> bool) Js.Fn.arity2 -> (module Hashable with type t = 'key1)
val hashable : hash:('key -> int) -> eq:('key0 -> 'key0 -> bool) -> (module Hashable with type t = 'key1)
OCaml

Innovation. Community. Security.