]> matita.cs.unibo.it Git - helm.git/commitdiff
added minimal euristic for generic terms carrier comparison
authorEnrico Tassi <enrico.tassi@inria.fr>
Fri, 14 Apr 2006 10:11:32 +0000 (10:11 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Fri, 14 Apr 2006 10:11:32 +0000 (10:11 +0000)
components/library/coercDb.ml

index c5356b3e17fb2dfe1f4722b22b4a952643bf9464..8b7982ea0576645c531fc82e5c599633ffcf39b2 100644 (file)
@@ -59,12 +59,14 @@ let eq_carr src tgt =
   | Sort (Cic.Type _), Sort (Cic.Type _) -> true
   | Sort src, Sort tgt when src = tgt -> true
   | Term t1, Term t2 ->
-    if CicUtil.is_meta_closed t1 && CicUtil.is_meta_closed t2 then
-      raise 
-        (EqCarrNotImplemented 
+      if t1 = t2 then true
+      else
+        if CicUtil.is_meta_closed t1 && CicUtil.is_meta_closed t2 then
+          raise 
+          (EqCarrNotImplemented 
           (lazy ("Unsupported carr for coercions: " ^ 
-            CicPp.ppterm t1 ^ " or " ^ CicPp.ppterm t2)))
-    else raise EqCarrOnNonMetaClosed
+          CicPp.ppterm t1 ^ " or " ^ CicPp.ppterm t2)))
+      else raise EqCarrOnNonMetaClosed
   | _, _ -> false
 
 let to_list () =