aboutsummaryrefslogtreecommitdiff
path: root/src/tac2stdlib.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2017-10-30 15:53:55 +0100
committerPierre-Marie Pédrot2017-10-30 17:12:16 +0100
commita997ee7d78d90740b15b58502a1dc5e587b43ee3 (patch)
tree0af87e2a77690deda29bec02a978076dd8f89d7e /src/tac2stdlib.ml
parentf18502f32fb25b29cafe26340edbbcedd463c646 (diff)
Introducing the change tactic.
Diffstat (limited to 'src/tac2stdlib.ml')
-rw-r--r--src/tac2stdlib.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tac2stdlib.ml b/src/tac2stdlib.ml
index 99fa0370e1..60b6e70d58 100644
--- a/src/tac2stdlib.ml
+++ b/src/tac2stdlib.ml
@@ -467,6 +467,13 @@ let () = define_red2 "eval_native" begin fun where c ->
Tac2tactics.eval_native where c
end
+let () = define_prim3 "tac_change" begin fun pat c cl ->
+ let pat = Value.to_option (fun p -> Value.to_pattern p) pat in
+ let c = Value.to_fun1 (array constr) constr c in
+ let cl = to_clause cl in
+ Tac2tactics.change pat c cl
+end
+
let () = define_prim4 "tac_rewrite" begin fun ev rw cl by ->
let ev = Value.to_bool ev in
let rw = Value.to_list to_rewriting rw in