aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-10-26 16:23:11 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-10-26 16:23:11 +0000
commitfb89587dde51d63b0de9a4d8ce1781451e8ed37c (patch)
treef786084f894b4388dd0e19803a67f49859398c6e /toplevel
parent32af9a99872b522add12ef4b7e9a42f64f556c4c (diff)
Vérification précoce qu'un lemme n'existe pas déjà
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2142 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/command.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml
index 51af38e20..ab2517b28 100644
--- a/toplevel/command.ml
+++ b/toplevel/command.ml
@@ -418,7 +418,11 @@ let start_proof_com sopt stre com =
let env = Global.env () in
let sign = Global.named_context () in
let id = match sopt with
- | Some id -> id
+ | Some id ->
+ (* We check existence here: it's a bit late at Qed time *)
+ if Nametab.exists_cci (Lib.make_path id CCI) then
+ errorlabstrm "start_proof" [< pr_id id; 'sTR " already exists" >];
+ id
| None ->
next_ident_away (id_of_string "Unnamed_thm")
(Pfedit.get_all_proof_names ())