From f57cdba1f7cad1891a2fcc38432f73a584d47e48 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 22 Jul 2010 08:03:17 +0000 Subject: [PATCH] avoid assert false, just fail generating the coercion --- .../components/grafite_engine/nCicCoercDeclaration.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2