diff options
| author | Hugo Herbelin | 2016-06-05 20:41:54 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2016-06-06 12:26:54 +0200 |
| commit | 9e9c7ce7ab325a194654c3cbc1e1bf4e276ba5b7 (patch) | |
| tree | 2fa1e6176d8546906eca844fd58b6170ff5aef45 /toplevel | |
| parent | e6b0ab5079186b7dba643a04e6222a4260de96ff (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 'toplevel')
| -rw-r--r-- | toplevel/himsg.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml index c0a99fe75c..3ff2d3fb18 100644 --- a/toplevel/himsg.ml +++ b/toplevel/himsg.ml @@ -1243,10 +1243,9 @@ let explain_reduction_tactic_error = function let is_defined_ltac trace = let rec aux = function - | (_, Proof_type.LtacNameCall f) :: tail -> - not (Tacenv.is_ltac_for_ml_tactic f) - | (_, Proof_type.LtacAtomCall _) :: tail -> - false + | (_, Proof_type.LtacNameCall f) :: tail -> not (Tacenv.is_ltac_for_ml_tactic f) + | (_, Proof_type.LtacNotationCall f) :: _ -> true + | (_, Proof_type.LtacAtomCall _) :: tail -> false | _ :: tail -> aux tail | [] -> false in aux (List.rev trace) @@ -1254,7 +1253,7 @@ let is_defined_ltac trace = let explain_ltac_call_trace last trace loc = let calls = last :: List.rev_map snd trace in let pr_call ck = match ck with - | Proof_type.LtacNotationCall kn -> quote (KerName.print kn) + | Proof_type.LtacNotationCall kn -> quote (Pptactic.pr_alias_key kn) | Proof_type.LtacNameCall cst -> quote (Pptactic.pr_ltac_constant cst) | Proof_type.LtacMLCall t -> quote (Pptactic.pr_glob_tactic (Global.env()) t) @@ -1276,6 +1275,7 @@ let explain_ltac_call_trace last trace loc = in match calls with | [] -> mt () + | [a] -> hov 0 (str "Ltac call to " ++ pr_call a ++ str " failed.") | _ -> let kind_of_last_call = match List.last calls with | Proof_type.LtacConstrInterp _ -> ", last term evaluation failed." |
