aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorherbelin2010-06-09 11:36:21 +0000
committerherbelin2010-06-09 11:36:21 +0000
commitee449d9506a68f994ddaae62fc768629ab368027 (patch)
tree182104234bd600b94213cde0876fa915c466971e /tactics
parent631b671285b846cb6c4758f1bcaba67deffd3a6a (diff)
Relaxed the freshness constraint in "intro H" (with "H" explicit):
don't forbid to overwrite a global reference of same basename. Should hopefully be more convenient. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13099 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tactics.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 5c96c138ea..59befa7852 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -410,7 +410,8 @@ let find_name loc decl gl = function
let id = fresh_id idl (default_id (pf_env gl) gl.sigma decl) gl in id
| IntroBasedOn (id,idl) -> fresh_id idl id gl
| IntroMustBe id ->
- let id' = fresh_id [] id gl in
+ (* When name is given, we allow to hide a global name *)
+ let id' = next_ident_away id (pf_ids_of_hyps gl) in
if id'<>id then user_err_loc (loc,"",pr_id id ++ str" is already used.");
id'