aboutsummaryrefslogtreecommitdiff
path: root/ltac
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-10-29 16:11:00 +0200
committerPierre-Marie Pédrot2016-10-29 16:11:00 +0200
commitcd1adfe2d51d05381a1044fb5a0086c608184ca9 (patch)
tree7a0828ac04b56ce7d764a10b339813cc95a6034d /ltac
parentebc07e5741fab0df15a8de56fc69397a7d164ce9 (diff)
parentb5d88066acbcebf598474e0d854b16078f4019ce (diff)
Merge branch 'v8.6'
Diffstat (limited to 'ltac')
-rw-r--r--ltac/tactic_debug.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/ltac/tactic_debug.ml b/ltac/tactic_debug.ml
index e1c9fed637..5cbddc7f64 100644
--- a/ltac/tactic_debug.ml
+++ b/ltac/tactic_debug.ml
@@ -385,6 +385,8 @@ let skip_extensions trace =
| [] -> [] in
List.rev (aux (List.rev trace))
+let finer_loc loc1 loc2 = Loc.merge loc1 loc2 = loc2
+
let extract_ltac_trace trace eloc =
let trace = skip_extensions trace in
let (loc,c),tail = List.sep_last trace in
@@ -392,11 +394,10 @@ let extract_ltac_trace trace eloc =
(* We entered a user-defined tactic,
we display the trace with location of the call *)
let msg = hov 0 (explain_ltac_call_trace c tail eloc ++ fnl()) in
- Some msg, loc
+ Some msg, if finer_loc eloc loc then eloc else loc
else
(* We entered a primitive tactic, we don't display trace but
report on the finest location *)
- let finer_loc loc1 loc2 = Loc.merge loc1 loc2 = loc2 in
let best_loc =
(* trace is with innermost call coming first *)
let rec aux best_loc = function