aboutsummaryrefslogtreecommitdiff
path: root/printing
diff options
context:
space:
mode:
authorHugo Herbelin2016-06-05 20:41:54 +0200
committerHugo Herbelin2016-06-06 12:26:54 +0200
commit9e9c7ce7ab325a194654c3cbc1e1bf4e276ba5b7 (patch)
tree2fa1e6176d8546906eca844fd58b6170ff5aef45 /printing
parente6b0ab5079186b7dba643a04e6222a4260de96ff (diff)
Fixing problems introduced in 8.5 with Ltac trace report. E.g.
Tactic Notation "f" constr(x) := apply x. Ltac g x := f x. Goal False. g I. (* Was printing Top.Top#<>#1 *) idtac; f I. (* Was not properly locating error *) This is a "a minima" fix. This a different fix than in trunk, so the merge will have to take the trunk version.
Diffstat (limited to 'printing')
-rw-r--r--printing/pptactic.ml10
-rw-r--r--printing/pptacticsig.mli2
2 files changed, 12 insertions, 0 deletions
diff --git a/printing/pptactic.ml b/printing/pptactic.ml
index 7e903d2d3d..08f037ca66 100644
--- a/printing/pptactic.ml
+++ b/printing/pptactic.ml
@@ -428,6 +428,16 @@ module Make
in
str "<" ++ name ++ str ">" ++ args
+ let pr_alias_key key =
+ try
+ let _,prods = (KNmap.find key !prnotation_tab).pptac_prods in
+ (* First printing strategy: only the head symbol *)
+ match prods with
+ | Some s :: _ -> str s
+ | _ -> raise Exit
+ with Not_found | Exit ->
+ KerName.print key
+
let pr_alias_gen pr_gen lev key l =
try
let pp = KNmap.find key !prnotation_tab in
diff --git a/printing/pptacticsig.mli b/printing/pptacticsig.mli
index b2323acba1..ecedc7756e 100644
--- a/printing/pptacticsig.mli
+++ b/printing/pptacticsig.mli
@@ -73,6 +73,8 @@ module type Pp = sig
(constr_pattern -> std_ppcmds) -> int ->
ml_tactic_name -> typed_generic_argument list -> std_ppcmds
+ val pr_alias_key : Names.KerName.t -> std_ppcmds
+
val pr_ltac_constant : Nametab.ltac_constant -> std_ppcmds
val pr_raw_tactic : raw_tactic_expr -> std_ppcmds