aboutsummaryrefslogtreecommitdiff
path: root/proofs/proofview.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-05-23 18:41:47 +0200
committerPierre-Marie Pédrot2014-06-03 01:20:36 +0200
commit259ec71685cf2180403e35acea32cb42ba6b761b (patch)
tree20364037953979d99e722591d2445fe5aa144b78 /proofs/proofview.ml
parent2e3f59f8d689b45fcad8cfd0f3dc1d5e693d8546 (diff)
The tactic interpreter now uses a new type of tactics, through
the GTac module. A ['a Gtac.t] is a special case of tactic that may depend on the current goals, or not. Internally, it construct a list of results, one for each focussed goal, if the tactic is actually dependent. This allows for an interpretation of whole-goal tactic that does work, which was not the case for the previous implementation, which did to many Proofview.Goal.enter.
Diffstat (limited to 'proofs/proofview.ml')
-rw-r--r--proofs/proofview.ml14
1 files changed, 14 insertions, 0 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml
index 6651e49652..eaaa1f7c30 100644
--- a/proofs/proofview.ml
+++ b/proofs/proofview.ml
@@ -826,6 +826,20 @@ module Goal = struct
tclZERO e
end
+ let goals =
+ Proof.current >>= fun env ->
+ Proof.get >>= fun step ->
+ let sigma = step.solution in
+ let map goal =
+ match Goal.advance sigma goal with
+ | None -> None (** ppedrot: Is this check really necessary? *)
+ | Some goal ->
+ (** The sigma is unchanged. *)
+ let (gl, _) = Goal.eval (enter_t (fun gl -> gl)) env sigma goal in
+ Some gl
+ in
+ tclUNIT (List.map_filter map step.comb)
+
(* compatibility *)
let goal { self=self } = self
let refresh_sigma g =