From: Enrico Tassi Date: Thu, 22 Jul 2010 08:03:17 +0000 (+0000) Subject: avoid assert false, just fail generating the coercion X-Git-Tag: make_still_working~2869 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=f57cdba1f7cad1891a2fcc38432f73a584d47e48;p=helm.git avoid assert false, just fail generating the coercion --- diff --git a/helm/software/components/grafite_engine/nCicCoercDeclaration.ml b/helm/software/components/grafite_engine/nCicCoercDeclaration.ml index 28aa0adf0..7fcd6a473 100644 --- a/helm/software/components/grafite_engine/nCicCoercDeclaration.ml +++ b/helm/software/components/grafite_engine/nCicCoercDeclaration.ml @@ -177,6 +177,7 @@ let fresh_uri status prefix suffix = diverge (mk "") 0 ;; +exception Stop;; let close_graph name t s d to_s from_d p a status = let c = @@ -224,7 +225,7 @@ let close_graph name t s d to_s from_d p a status = let pos = match p with | NCic.Meta (p,_) -> pos_in_list p (List.map fst metasenv) - | t -> assert false + | t -> raise Stop in let ty = NCicTypeChecker.typeof ~metasenv:[] ~subst:[] [] bo in let src,tgt = src_tgt_of_ty_cpos_arity ty pos arity in @@ -251,7 +252,7 @@ let close_graph name t s d to_s from_d p a status = with | NCicTypeChecker.TypeCheckerFailure _ | NCicUnification.UnificationFailure _ - | NCicUnification.Uncertain _ -> None + | NCicUnification.Uncertain _ | Stop -> None ) composites in composites