]> matita.cs.unibo.it Git - helm.git/blobdiff - components/cic/libraryObjects.ml
snopshot (working one!)
[helm.git] / components / cic / libraryObjects.ml
index 7e1dc626f7885afe404fe224310b5c2a60a196e8..e402f4db214433ce174396929744ba8a4042d2cf 100644 (file)
@@ -80,7 +80,25 @@ let reset_defaults () =
   true_URIs_ref := default_true_URIs;
   false_URIs_ref := default_false_URIs;
   absurd_URIs_ref := default_absurd_URIs
+;;
+
+let stack = ref [];;
 
+let push () =
+  stack := (!eq_URIs_ref, !true_URIs_ref, !false_URIs_ref, !absurd_URIs_ref)::!stack;
+  reset_defaults ()
+;;
+
+let pop () =
+  match !stack with
+  | [] -> raise (Failure "Unable to POP in libraryObjects.ml")
+  | (eq,t,f,a)::tl ->
+      stack := tl;
+      eq_URIs_ref := eq;
+      true_URIs_ref := t;
+      false_URIs_ref := f;
+      absurd_URIs_ref := a
+;;
 
 (**** LOOKUP FUNCTIONS ****)
 let eq_URI () =