From a20e2a220e276bb34f0686834a133a872b773224 Mon Sep 17 00:00:00 2001 From: letouzey Date: Sun, 17 Mar 2013 22:41:10 +0000 Subject: 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 --- printing/ppvernac.ml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'printing/ppvernac.ml') 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) -- cgit v1.2.3