]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/ng_refiner/nCicMetaSubst.ml
Quick patch: the maxmeta is now pushed/popped when compiling an external file.
[helm.git] / matita / components / ng_refiner / nCicMetaSubst.ml
index e3ee8d60e0bdb48025c46a84da36e107d7f8e42f..0207c9231e058b15d5ab820d21b0bf1719ca2cca 100644 (file)
@@ -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];;