aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-02-26 18:31:32 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-03-27 19:10:11 +0200
commit3e2887bbcba6846ce3a18898fcfebe48632b72b9 (patch)
tree4ce4c7b71faaed13e0de28e719bdd7ff192b567b
parent157218226997281ddb674899ffe8b65cada4bcb6 (diff)
Adding informative variant of shelve_unifiable returning set of shelved evars.
-rw-r--r--engine/proofview.ml10
-rw-r--r--engine/proofview.mli3
2 files changed, 11 insertions, 2 deletions
diff --git a/engine/proofview.ml b/engine/proofview.ml
index 22271dd02..b7014c542 100644
--- a/engine/proofview.ml
+++ b/engine/proofview.ml
@@ -710,13 +710,19 @@ let partition_unifiable sigma l =
(** Shelves the unifiable goals under focus, i.e. the goals which
appear in other goals under focus (the unfocused goals are not
considered). *)
-let shelve_unifiable =
+let shelve_unifiable_informative =
let open Proof in
Pv.get >>= fun initial ->
let (u,n) = partition_unifiable initial.solution initial.comb in
Comb.set n >>
InfoL.leaf (Info.Tactic (fun () -> Pp.str"shelve_unifiable")) >>
- Shelf.modify (fun gls -> gls @ CList.map drop_state u)
+ let u = CList.map drop_state u in
+ Shelf.modify (fun gls -> gls @ u) >>
+ tclUNIT u
+
+let shelve_unifiable =
+ let open Proof in
+ shelve_unifiable_informative >>= fun _ -> tclUNIT ()
(** [guard_no_unifiable] returns the list of unifiable goals if some
goals are unifiable (see {!shelve_unifiable}) in the current focus. *)
diff --git a/engine/proofview.mli b/engine/proofview.mli
index e7be66552..804f1543d 100644
--- a/engine/proofview.mli
+++ b/engine/proofview.mli
@@ -326,6 +326,9 @@ val unifiable : Evd.evar_map -> Evar.t -> Evar.t list -> bool
considered). *)
val shelve_unifiable : unit tactic
+(** Idem but also returns the list of shelved variables *)
+val shelve_unifiable_informative : Evar.t list tactic
+
(** [guard_no_unifiable] returns the list of unifiable goals if some
goals are unifiable (see {!shelve_unifiable}) in the current focus. *)
val guard_no_unifiable : Names.Name.t list option tactic