From bf12eb93f3f6a6a824a10878878fadd59745aae0 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sat, 29 Dec 2012 10:57:43 +0100 Subject: Imported Upstream version 8.4pl1dfsg --- proofs/pfedit.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'proofs/pfedit.ml') diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml index 5e314069..45e4a84e 100644 --- a/proofs/pfedit.ml +++ b/proofs/pfedit.ml @@ -62,9 +62,12 @@ let get_undo _ = None let start_proof id str hyps c ?init_tac ?compute_guard hook = let goals = [ (Global.env_of_context hyps , c) ] in - let init_tac = Option.map Proofview.V82.tactic init_tac in Proof_global.start_proof id str goals ?compute_guard hook; - try Option.iter Proof_global.run_tactic init_tac + let tac = match init_tac with + | Some tac -> Proofview.V82.tactic tac + | None -> Proofview.tclUNIT () + in + try Proof_global.run_tactic tac with e -> Proof_global.discard_current (); raise e let restart_proof () = undo_todepth 1 -- cgit v1.2.3