X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_refiner%2FnCicMetaSubst.ml;h=0207c9231e058b15d5ab820d21b0bf1719ca2cca;hb=df0dc72bccac82b3dd69108b5996d7008d007601;hp=57f12a458fd160bb3a1917bbad2079101aad7e00;hpb=e305a62a7cb0a49fea3d241474e4c5bcd40e7272;p=helm.git diff --git a/matita/components/ng_refiner/nCicMetaSubst.ml b/matita/components/ng_refiner/nCicMetaSubst.ml index 57f12a458..0207c9231 100644 --- a/matita/components/ng_refiner/nCicMetaSubst.ml +++ b/matita/components/ng_refiner/nCicMetaSubst.ml @@ -47,10 +47,13 @@ let outside exc_opt = exception MetaSubstFailure of string Lazy.t exception Uncertain of string Lazy.t -let newmeta,maxmeta = +let newmeta,maxmeta,pushmaxmeta,popmaxmeta = let maxmeta = ref 0 in + let pushedmetas = ref [] in (fun () -> incr maxmeta; !maxmeta), - (fun () -> !maxmeta) + (fun () -> !maxmeta), + (fun () -> pushedmetas := !maxmeta::!pushedmetas; maxmeta := 0), + (fun () -> match !pushedmetas with [] -> assert false | hd::tl -> pushedmetas := tl) ;; exception NotFound of [`NotInTheList | `NotWellTyped];; @@ -515,6 +518,11 @@ let delift status ~unify metasenv subst context n l t = NCicUtils.Meta_not_found _ -> (* Fake metavariable used in NTacStatus and NCicRefiner :-( *) assert (n = -1); res + | NCicTypeChecker.TypeCheckerFailure msg -> + HLog.error "----------- Problem with Dependent Types ----------"; + HLog.error (Lazy.force msg) ; + HLog.error "---------------------------------------------------"; + raise (NotFound `NotWellTyped) | TypeNotGood | NCicTypeChecker.AssertFailure _ | NCicReduction.AssertFailure _