aboutsummaryrefslogtreecommitdiff
path: root/lib/hashcons.ml
diff options
context:
space:
mode:
authorHugo Herbelin2015-08-02 19:31:00 +0200
committerHugo Herbelin2015-08-02 19:35:53 +0200
commit35ba593b4ecb805b4e69c01c56fb4b93dfafdf0b (patch)
treeffcf6a36e224f1a41996f7ede84d773753254209 /lib/hashcons.ml
parent707bfd5719b76d131152a258d49740165fbafe03 (diff)
Reverting 16 last commits, committed mistakenly using the wrong push command.
Sorry so much. Reverted: 707bfd5719b76d131152a258d49740165fbafe03. 164637cc3a4e8895ed4ec420e300bd692d3e7812. b9c96c601a8366b75ee8b76d3184ee57379e2620. 21e41af41b52914469885f40155702f325d5c786. 7532f3243ba585f21a8f594d3dc788e38dfa2cb8. 27fb880ab6924ec20ce44aeaeb8d89592c1b91cd. fe340267b0c2082b3af8bc965f7bc0e86d1c3c2c. d9b13d0a74bc0c6dff4bfc61e61a3d7984a0a962. 6737055d165c91904fc04534bee6b9c05c0235b1. 342fed039e53f00ff8758513149f8d41fa3a2e99. 21525bae8801d98ff2f1b52217d7603505ada2d2. b78d86d50727af61e0c4417cf2ef12cbfc73239d. 979de570714d340aaab7a6e99e08d46aa616e7da. f556da10a117396c2c796f6915321b67849f65cd. d8226295e6237a43de33475f798c3c8ac6ac4866. fdab811e58094accc02875c1f83e6476f4598d26.
Diffstat (limited to 'lib/hashcons.ml')
-rw-r--r--lib/hashcons.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/hashcons.ml b/lib/hashcons.ml
index d368e20e6d..46ba0b6285 100644
--- a/lib/hashcons.ml
+++ b/lib/hashcons.ml
@@ -15,7 +15,7 @@
* of objects of type t (u usually has the form (t1->t1)*(t2->t2)*...).
* [hashcons u x] is a function that hash-cons the sub-structures of x using
* the hash-consing functions u provides.
- * [eq] is a comparison function. It is allowed to use physical equality
+ * [equal] is a comparison function. It is allowed to use physical equality
* on the sub-terms hash-consed by the hashcons function.
* [hash] is the hash function given to the Hashtbl.Make function
*
@@ -27,7 +27,7 @@ module type HashconsedType =
type t
type u
val hashcons : u -> t -> t
- val eq : t -> t -> bool
+ val equal : t -> t -> bool
val hash : t -> int
end
@@ -53,7 +53,7 @@ module Make (X : HashconsedType) : (S with type t = X.t and type u = X.u) =
(* We create the type of hashtables for t, with our comparison fun.
* An invariant is that the table never contains two entries equals
- * w.r.t (=), although the equality on keys is X.eq. This is
+ * w.r.t (=), although the equality on keys is X.equal. This is
* granted since we hcons the subterms before looking up in the table.
*)
module Htbl = Hashset.Make(X)
@@ -124,7 +124,7 @@ module Hlist (D:HashedType) =
let hashcons (hrec,hdata) = function
| x :: l -> hdata x :: hrec l
| l -> l
- let eq l1 l2 =
+ let equal l1 l2 =
l1 == l2 ||
match l1, l2 with
| [], [] -> true
@@ -144,7 +144,7 @@ module Hstring = Make(
type t = string
type u = unit
let hashcons () s =(* incr accesstr;*) s
- external eq : string -> string -> bool = "caml_string_equal" "noalloc"
+ external equal : string -> string -> bool = "caml_string_equal" "noalloc"
(** Copy from CString *)
let rec hash len s i accu =
if i = len then accu
@@ -191,7 +191,7 @@ module Hobj = Make(
type t = Obj.t
type u = (Obj.t -> Obj.t) * unit
let hashcons (hrec,_) = hash_obj hrec
- let eq = comp_obj
+ let equal = comp_obj
let hash = Hashtbl.hash
end)