This is implemented imperatively for now. It should go into a status.
exception MetaSubstFailure of string Lazy.t
exception Uncertain of string Lazy.t
exception MetaSubstFailure of string Lazy.t
exception Uncertain of string Lazy.t
+let newmeta,maxmeta,pushmaxmeta,popmaxmeta =
+ let pushedmetas = ref [] in
(fun () -> incr maxmeta; !maxmeta),
(fun () -> incr maxmeta; !maxmeta),
+ (fun () -> !maxmeta),
+ (fun () -> pushedmetas := !maxmeta::!pushedmetas; maxmeta := 0),
+ (fun () -> match !pushedmetas with [] -> assert false | hd::tl -> pushedmetas := tl)
;;
exception NotFound of [`NotInTheList | `NotWellTyped];;
;;
exception NotFound of [`NotInTheList | `NotWellTyped];;
(* the index of the last created meta *)
val maxmeta: unit -> int
(* the index of the last created meta *)
val maxmeta: unit -> int
+(* Bad, this should be made functional and put in the status! *)
+val pushmaxmeta: unit -> unit
+val popmaxmeta: unit -> unit
+
(* the delift function takes in input a metavariable index, a local_context
* and a term t, and substitutes every subterm t' of t with its position
* (searched up-to unification) in
(* the delift function takes in input a metavariable index, a local_context
* and a term t, and substitutes every subterm t' of t with its position
* (searched up-to unification) in