Module Base__.Hashable_intf

module type Key = sig ... end
module Hashable : sig ... end
include Hashable
type 'a t = {
hash : 'a -> int;
compare : 'a -> 'a -> int;
sexp_of_t : 'a -> Base.Sexp.t;
}
val equal : 'a t -> 'a t -> bool

This function is sound but not complete, meaning that if it returns true then it's safe to use the two interchangeably. If it's false, you have no guarantees. For example:

> utop
open Core;;
let equal (a : 'a Hashtbl_intf.Hashable.t) b =
  phys_equal a b
  || (phys_equal a.hash b.hash
      && phys_equal a.compare b.compare
      && phys_equal a.sexp_of_t b.sexp_of_t)
;;
let a = Hashtbl_intf.Hashable.{ hash; compare; sexp_of_t = Int.sexp_of_t };;
let b = Hashtbl_intf.Hashable.{ hash; compare; sexp_of_t = Int.sexp_of_t };;
equal a b;;  (* false?! *)
val hash_param : int -> int -> 'a -> int
val hash : 'a -> int
val poly : 'a t
val of_key : (module Key with type t = 'a) -> 'a t
val to_key : 'a t -> (module Key with type t = 'a)
module type Hashable = sig ... end