diff options
| author | corbinea | 2003-07-08 15:18:22 +0000 |
|---|---|---|
| committer | corbinea | 2003-07-08 15:18:22 +0000 |
| commit | 67677229a29a049c8b1e8d8a4618d81b16730316 (patch) | |
| tree | c027a2dbfcf58c76c4f7e13a4efda7e47d071552 /proofs | |
| parent | e27e7e21f2fba8e20484a9f85c496f246f4c4753 (diff) | |
Ground update
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4227 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/refiner.ml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/proofs/refiner.ml b/proofs/refiner.ml index e68b4bf4a5..7ab2003e35 100644 --- a/proofs/refiner.ml +++ b/proofs/refiner.ml @@ -530,18 +530,26 @@ let rec tclFIRST = function | [] -> tclFAIL_s "No applicable tactic." | t::rest -> tclORELSE0 t (tclFIRST rest) -let ite_gen tcal tac_if continue tac_else= +let ite_gen tcal tac_if continue tac_else gl= let success=ref false in let tac_if0 gl= let result=tac_if gl in success:=true;result in - let tac_else0 gl= + let tac_else0 e gl= if !success then - tclFAIL_s "failure in THEN branch" gl + raise e else tac_else gl in - tclORELSE0 (tcal tac_if0 continue) (tac_else0) - + try + tcal tac_if0 continue gl + with + | e when catchable_exception e -> tac_else0 e gl + | (FailError (0,_) | Stdpp.Exc_located(_, FailError (0,_))) as e -> + tac_else0 e gl + | FailError (lvl,s) -> raise (FailError (lvl - 1, s)) + | Stdpp.Exc_located (s,FailError (lvl,s')) -> + raise (Stdpp.Exc_located (s,FailError (lvl - 1, s'))) + (* Try the first tactic and, if it succeeds, continue with the second one, and if it fails, use the third one *) |
