From 1b2a6326876c67bf25657ecd7c0765cacd1cde75 Mon Sep 17 00:00:00 2001 From: ppedrot Date: Thu, 30 May 2013 17:55:59 +0000 Subject: Removing a useless location in ltac trace mechanism. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16547 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tactics/tacinterp.ml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tactics') diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml index 6c66f4ced2..761dfe6a9b 100644 --- a/tactics/tacinterp.ml +++ b/tactics/tacinterp.ml @@ -71,20 +71,15 @@ let dloc = Loc.ghost let catch_error call_trace tac g = try tac g with e when Errors.noncritical e -> let e = Errors.push e in - let inner_trace,loc,e = match Exninfo.get e ltac_trace_info with - | Some (inner_trace,loc) -> inner_trace,loc,e - | None -> - let loc = match Loc.get_loc e with - | None -> Loc.ghost - | Some loc -> loc - in - [], loc, e + let inner_trace, e = match Exninfo.get e ltac_trace_info with + | Some inner_trace -> inner_trace, e + | None -> [], e in if List.is_empty call_trace && List.is_empty inner_trace then raise e else begin assert (Errors.noncritical e); (* preserved invariant *) let new_trace = inner_trace @ call_trace in - let located_exc = Exninfo.add e ltac_trace_info (new_trace, loc) in + let located_exc = Exninfo.add e ltac_trace_info new_trace in raise located_exc end -- cgit v1.2.3