aboutsummaryrefslogtreecommitdiff
path: root/tactics/autorewrite.ml
diff options
context:
space:
mode:
authoraspiwack2013-11-02 15:38:32 +0000
committeraspiwack2013-11-02 15:38:32 +0000
commit00d30f5330f4f1dd487d5754a0fb855a784efbf0 (patch)
treedef0f4e640f71192748a2e964b92b9418970a98d /tactics/autorewrite.ml
parentea879916e09cd19287c831152d7ae2a84c61f4b0 (diff)
Tachmach.New is now in Proofview.Goal.enter style.
As a result the use of the glist-style interface for manipulating goals has almost been removed. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17001 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics/autorewrite.ml')
-rw-r--r--tactics/autorewrite.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/tactics/autorewrite.ml b/tactics/autorewrite.ml
index 9c1f462bac..da8f2668b8 100644
--- a/tactics/autorewrite.ml
+++ b/tactics/autorewrite.ml
@@ -113,8 +113,9 @@ let autorewrite ?(conds=Naive) tac_main lbas =
(Proofview.tclUNIT()) lbas))
let autorewrite_multi_in ?(conds=Naive) idl tac_main lbas =
+ Proofview.Goal.enter begin fun gl ->
(* let's check at once if id exists (to raise the appropriate error) *)
- Proofview.Goal.lift (Goal.sensitive_list_map Tacmach.New.pf_get_hyp_sensitive idl) >>= fun _ ->
+ let _ = List.map (fun id -> Tacmach.New.pf_get_hyp id gl) idl in
let general_rewrite_in id =
let id = ref id in
let to_be_cleared = ref false in
@@ -155,6 +156,7 @@ let autorewrite_multi_in ?(conds=Naive) idl tac_main lbas =
(List.fold_left (fun tac bas ->
Tacticals.New.tclTHEN tac (one_base (general_rewrite_in id) tac_main bas)) (Proofview.tclUNIT()) lbas)))
idl
+ end
let autorewrite_in ?(conds=Naive) id = autorewrite_multi_in ~conds [id]
@@ -179,8 +181,10 @@ let gen_auto_multi_rewrite conds tac_main lbas cl =
| None ->
(* try to rewrite in all hypothesis
(except maybe the rewritten one) *)
- Tacmach.New.pf_ids_of_hyps >>= fun ids ->
- try_do_hyps (fun id -> id) ids)
+ Proofview.Goal.enter begin fun gl ->
+ let ids = Tacmach.New.pf_ids_of_hyps gl in
+ try_do_hyps (fun id -> id) ids
+ end)
let auto_multi_rewrite ?(conds=Naive) = gen_auto_multi_rewrite conds (Proofview.tclUNIT())