diff options
| author | herbelin | 2013-02-17 14:55:59 +0000 |
|---|---|---|
| committer | herbelin | 2013-02-17 14:55:59 +0000 |
| commit | 97fc36f552bfd9731ac47716faf2b02d4555eb07 (patch) | |
| tree | 4f721ab62db1960d4f7eaad443fd284c603999f8 /proofs | |
| parent | 45f177b92fa98d5f64b16309cacf4e532ff53645 (diff) | |
Revised the Ltac trace mechanism so that trace breaking due to
interleaving of ltac and ml code is not visible (this particularly
applies to ltac notation ring, which calls ml-level ring_lookup and
Ring again at the ltac level, resulting in non-localisation of "ring"
errors).
Added also missing LtacLocated checks in Class_instance and Proofview.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16204 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/logic.ml | 2 | ||||
| -rw-r--r-- | proofs/proof_type.ml | 2 | ||||
| -rw-r--r-- | proofs/proof_type.mli | 2 | ||||
| -rw-r--r-- | proofs/proofs.mllib | 2 | ||||
| -rw-r--r-- | proofs/proofview.ml | 1 | ||||
| -rw-r--r-- | proofs/refiner.ml | 7 |
6 files changed, 8 insertions, 8 deletions
diff --git a/proofs/logic.ml b/proofs/logic.ml index 2f88c79a75..267e9d5bf2 100644 --- a/proofs/logic.ml +++ b/proofs/logic.ml @@ -42,7 +42,7 @@ open Pretype_errors let rec catchable_exception = function | Loc.Exc_located(_,e) -> catchable_exception e - | LtacLocated(_,e) -> catchable_exception e + | LtacLocated(_,_,e) -> catchable_exception e | Errors.UserError _ | TypeError _ | PretypeError (_,_,TypingError _) | RefinerError _ | Indrec.RecursionSchemeError _ | Nametab.GlobalizationError _ | PretypeError (_,_,VarNotFound _) diff --git a/proofs/proof_type.ml b/proofs/proof_type.ml index eadf870fb4..af50059b8d 100644 --- a/proofs/proof_type.ml +++ b/proofs/proof_type.ml @@ -57,5 +57,5 @@ type ltac_call_kind = type ltac_trace = (int * Loc.t * ltac_call_kind) list -exception LtacLocated of (int * ltac_call_kind * ltac_trace * Loc.t) * exn +exception LtacLocated of ltac_trace * Loc.t * exn diff --git a/proofs/proof_type.mli b/proofs/proof_type.mli index 37d5c4544c..7ff1afc224 100644 --- a/proofs/proof_type.mli +++ b/proofs/proof_type.mli @@ -82,4 +82,4 @@ type ltac_call_kind = type ltac_trace = (int * Loc.t * ltac_call_kind) list -exception LtacLocated of (int * ltac_call_kind * ltac_trace * Loc.t) * exn +exception LtacLocated of ltac_trace * Loc.t * exn diff --git a/proofs/proofs.mllib b/proofs/proofs.mllib index 96af73b711..19f289316f 100644 --- a/proofs/proofs.mllib +++ b/proofs/proofs.mllib @@ -1,10 +1,10 @@ Goal Evar_refiner Monads +Proof_type Proofview Proof Proof_global -Proof_type Redexpr Logic Refiner diff --git a/proofs/proofview.ml b/proofs/proofview.ml index bcd51fe2b1..c18c48744e 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -335,6 +335,7 @@ let tclEXTEND tacs1 rtac tacs2 env = open Pretype_errors let rec catchable_exception = function | Loc.Exc_located(_,e) -> catchable_exception e + | Proof_type.LtacLocated(_,_,e) -> catchable_exception e | Errors.UserError _ | Type_errors.TypeError _ | PretypeError (_,_,TypingError _) | Indrec.RecursionSchemeError _ diff --git a/proofs/refiner.ml b/proofs/refiner.ml index c83d5ca7af..332f255b25 100644 --- a/proofs/refiner.ml +++ b/proofs/refiner.ml @@ -217,14 +217,13 @@ let catch_failerror e = if catchable_exception e then check_for_interrupt () else match e with | FailError (0,_) | Loc.Exc_located(_, FailError (0,_)) - | Loc.Exc_located(_, LtacLocated (_,FailError (0,_))) -> + | LtacLocated (_,_,FailError (0,_)) -> check_for_interrupt () | FailError (lvl,s) -> raise (FailError (lvl - 1, s)) | Loc.Exc_located(s,FailError (lvl,s')) -> raise (Loc.Exc_located(s,FailError (lvl - 1, s'))) - | Loc.Exc_located(s,LtacLocated (s'',FailError (lvl,s'))) -> - raise - (Loc.Exc_located(s,LtacLocated (s'',FailError (lvl - 1,s')))) + | LtacLocated (s'',loc,FailError (lvl,s')) -> + raise (LtacLocated (s'',loc,FailError (lvl - 1,s'))) | e -> raise e (* ORELSE0 t1 t2 tries to apply t1 and if it fails, applies t2 *) |
