ClosuresOnStackByValueFromEnvOrEnsByNameOnConstantsStrategy;;
*)
module R = Reduction(ClosuresOnStackByValueFromEnvOrEnsStrategy);;
+module U = UriManager;;
let whd = R.whd;;
+ (* mimic ocaml (<< 3.08) "=" behaviour. Tests physical equality first then
+ * fallbacks to structural equality *)
+let (===) x y = (Pervasives.compare x y = 0)
+
(* t1, t2 must be well-typed *)
let are_convertible ?(subst=[]) ?(metasenv=[]) =
- let module U = UriManager in
let rec aux test_equality_only context t1 t2 =
let aux2 test_equality_only t1 t2 =
(* this trivial euristic cuts down the total time of about five times ;-) *)
(* this because most of the time t1 and t2 are "sintactically" the same *)
- if t1 = t2 then
+ if t1 === t2 then
true
else
begin
| (_,_) -> false
end
in
+(*
if aux2 test_equality_only t1 t2 then true
else
+*)
begin
debug t1 [t2] "PREWHD";
(*