aboutsummaryrefslogtreecommitdiff
path: root/tactics/ftactic.ml
diff options
context:
space:
mode:
authorArnaud Spiwack2014-10-22 18:12:52 +0200
committerArnaud Spiwack2014-11-01 22:43:57 +0100
commit212dec2878f1dfe2a5fa06ac7722df06ef5dd5a6 (patch)
treeee3ca73172b8f2605a1cae1946e63fbdb342c50e /tactics/ftactic.ml
parent9826a9f56b11125d6d0b540546f04dc12f845090 (diff)
Info: tactic notations (TacAlias) print their names.
Empirically it works better on some notations than on others and I have no idea why. I've seen notations not printing their arguments, for instance, and other printing perfectly.
Diffstat (limited to 'tactics/ftactic.ml')
-rw-r--r--tactics/ftactic.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tactics/ftactic.ml b/tactics/ftactic.ml
index 6d6e43b21d..01c2fde2a9 100644
--- a/tactics/ftactic.ml
+++ b/tactics/ftactic.ml
@@ -48,6 +48,15 @@ let enter f =
bind (Proofview.Goal.goals >>= fun l -> Proofview.tclUNIT (Depends l))
(fun gl -> gl >>= fun gl -> Proofview.V82.wrap_exceptions (fun () -> f gl))
+let with_env t =
+ t >>= function
+ | Uniform a ->
+ Proofview.tclENV >>= fun env -> Proofview.tclUNIT (Uniform (env,a))
+ | Depends l ->
+ Proofview.Goal.goals >>= fun gs ->
+ Proofview.Monad.(List.map (map Proofview.Goal.env) gs) >>= fun envs ->
+ Proofview.tclUNIT (Depends (List.combine envs l))
+
let lift (type a) (t:a Proofview.tactic) : a t =
Proofview.tclBIND t (fun x -> Proofview.tclUNIT (Uniform x))