From: Claudio Sacerdoti Coen Date: Tue, 15 Nov 2005 17:12:45 +0000 (+0000) Subject: Bug fixed: wrong exception was raised (instead of returning false) X-Git-Tag: V_0_7_2_3~75 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=a55204cdb99a6fe3015e665b552c68e9f8a6eedb Bug fixed: wrong exception was raised (instead of returning false) when eq_carr-comparing two different things --- diff --git a/helm/ocaml/cic_unification/coercDb.ml b/helm/ocaml/cic_unification/coercDb.ml index 969d482c1..c56fc1fef 100644 --- a/helm/ocaml/cic_unification/coercDb.ml +++ b/helm/ocaml/cic_unification/coercDb.ml @@ -44,13 +44,14 @@ let eq_carr src tgt = | Uri src, Uri tgt -> UriManager.eq src tgt | Sort (Cic.Type _), Sort (Cic.Type _) -> true | Sort src, Sort tgt when src = tgt -> true - | Term t1, Term t2 when - CicUtil.is_meta_closed t1 && CicUtil.is_meta_closed t2 -> + | Term t1, Term t2 -> + 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))) - | _ -> raise EqCarrOnNonMetaClosed + else raise EqCarrOnNonMetaClosed + | _, _ -> false let name_of_carr = function | Uri u -> UriManager.name_of_uri u