aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/ppvernac.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-17 22:41:10 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-17 22:41:10 +0000
commita20e2a220e276bb34f0686834a133a872b773224 (patch)
tree4c0ac1d34cc8b9beac3655a3e08f7378e373e255 /printing/ppvernac.ml
parentd028f9233d7cca269485eff20a06cfab2e98acf7 (diff)
Ppvernac: no globalization for printing ltac definitions
This way, ppvernac is entirely at the "raw" level : constr_expr, raw_tactic_expr, ... Using globalization for ltac was awkward since it was the only such place handled this way. Moreover the env necessary for pr_glob_tactic was possibly wrong (cf last commit concerning module params), and the pr_glob_tactic was raising exceptions from time to time (typically on a "eval ..." ltac raising a "tactic expected"). Feel free to revert if this globalization has indeed an interest I missed. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16312 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'printing/ppvernac.ml')
-rw-r--r--printing/ppvernac.ml13
1 files changed, 2 insertions, 11 deletions
diff --git a/printing/ppvernac.ml b/printing/ppvernac.ml
index 339d16ece..572876e5b 100644
--- a/printing/ppvernac.ml
+++ b/printing/ppvernac.ml
@@ -60,11 +60,6 @@ let sep_end = function
| VernacEndSubproof -> str""
| _ -> str"."
-(* Warning: [pr_raw_tactic] globalises and fails if globalisation fails *)
-
-let pr_raw_tactic_env l env t =
- pr_glob_tactic env (Tacintern.glob_tactic_env l env t)
-
let pr_gen t =
pr_raw_generic
pr_constr_expr
@@ -805,12 +800,8 @@ let rec pr_vernac = function
prlist (function None -> str " _"
| Some id -> spc () ++ pr_id id) idl
++ (if redef then str" ::=" else str" :=") ++ brk(1,1) ++
- let idl = List.map_filter (fun x -> x) idl in
- pr_raw_tactic_env
- (idl @ List.map coerce_reference_to_id
- (List.map (fun (x, _, _) -> x) (List.filter (fun (_, redef, _) -> not redef) l)))
- (Global.env())
- body in
+ pr_raw_tactic body
+ in
hov 1
(pr_locality local ++ str "Ltac " ++
prlist_with_sep (fun () -> fnl() ++ str"with ") pr_tac_body l)