diff options
author | 2007-02-13 13:48:12 +0000 | |
---|---|---|
committer | 2007-02-13 13:48:12 +0000 | |
commit | 7f076db2a924377e9de3f9a6d838b8c44ed2e16d (patch) | |
tree | e075c526532a227c83d951c9dff8c944ea0c4d15 /contrib/funind/functional_principles_types.ml | |
parent | 2a14f39fdfa80b021227396b22e38ed7c35356df (diff) | |
parent | 55ce117e8083477593cf1ff2e51a3641c7973830 (diff) |
Merge commit 'upstream/8.1+dfsg' into 8.1
Diffstat (limited to 'contrib/funind/functional_principles_types.ml')
-rw-r--r-- | contrib/funind/functional_principles_types.ml | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/contrib/funind/functional_principles_types.ml b/contrib/funind/functional_principles_types.ml index 89ebb75a..8ad2e72b 100644 --- a/contrib/funind/functional_principles_types.ml +++ b/contrib/funind/functional_principles_types.ml @@ -405,11 +405,26 @@ let generate_functional_principle let (id,(entry,g_kind,hook)) = build_functional_principle interactive_proof old_princ_type new_sorts funs i proof_tac hook in + (* Pr 1278 : + Don't forget to close the goal if an error is raised !!!! + *) save false new_princ_name entry g_kind hook - with - | Defining_principle _ as e -> raise e - | e -> raise (Defining_principle e) - + with e -> + begin + begin + try + let id = Pfedit.get_current_proof_name () in + let s = string_of_id id in + let n = String.length "___________princ_________" in + if String.length s >= n + then if String.sub s 0 n = "___________princ_________" + then Pfedit.delete_current_proof () + else () + else () + with _ -> () + end; + raise (Defining_principle e) + end (* defined () *) |