aboutsummaryrefslogtreecommitdiff
path: root/toplevel/metasyntax.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-06-30 19:01:11 +0200
committerPierre-Marie Pédrot2014-06-30 23:14:11 +0200
commit6987d434687890b6218b252b89b55ab5d3ef2221 (patch)
tree0a277af5e53e525d33f044d56522651ffe1a204f /toplevel/metasyntax.ml
parentfa69f12babe7f04fbda9a22eaf76736a96f0fdea (diff)
Useless keeping of dirpath in tactic aliases.
Diffstat (limited to 'toplevel/metasyntax.ml')
-rw-r--r--toplevel/metasyntax.ml13
1 files changed, 5 insertions, 8 deletions
diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml
index a398b77774..6f6bfc52e7 100644
--- a/toplevel/metasyntax.ml
+++ b/toplevel/metasyntax.ml
@@ -65,12 +65,11 @@ type tactic_grammar_obj = {
tacobj_local : locality_flag;
tacobj_tacgram : tactic_grammar;
tacobj_tacpp : Pptactic.pp_tactic;
- tacobj_body : DirPath.t * Tacexpr.glob_tactic_expr
+ tacobj_body : Tacexpr.glob_tactic_expr
}
let cache_tactic_notation ((_, key), tobj) =
- let (dp, body) = tobj.tacobj_body in
- Tacenv.register_alias key dp body;
+ Tacenv.register_alias key tobj.tacobj_body;
Egramcoq.extend_tactic_grammar key tobj.tacobj_tacgram;
Pptactic.declare_notation_tactic_pprule key tobj.tacobj_tacpp
@@ -79,16 +78,14 @@ let open_tactic_notation i ((_, key), tobj) =
Egramcoq.extend_tactic_grammar key tobj.tacobj_tacgram
let load_tactic_notation i ((_, key), tobj) =
- let (dp, body) = tobj.tacobj_body in
(** Only add the printing and interpretation rules. *)
- Tacenv.register_alias key dp body;
+ Tacenv.register_alias key tobj.tacobj_body;
Pptactic.declare_notation_tactic_pprule key tobj.tacobj_tacpp;
if Int.equal i 1 && not tobj.tacobj_local then
Egramcoq.extend_tactic_grammar key tobj.tacobj_tacgram
let subst_tactic_notation (subst, tobj) =
- let dir, tac = tobj.tacobj_body in
- { tobj with tacobj_body = (dir, Tacsubst.subst_tactic subst tac); }
+ { tobj with tacobj_body = Tacsubst.subst_tactic subst tobj.tacobj_body; }
let classify_tactic_notation tacobj = Substitute tacobj
@@ -121,7 +118,7 @@ let add_tactic_notation (local,n,prods,e) =
tacobj_local = local;
tacobj_tacgram = parule;
tacobj_tacpp = pprule;
- tacobj_body = (Lib.cwd (), tac);
+ tacobj_body = tac;
} in
Lib.add_anonymous_leaf (inTacticGrammar tacobj)