From ee449d9506a68f994ddaae62fc768629ab368027 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 9 Jun 2010 11:36:21 +0000 Subject: 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 --- tactics/tactics.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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' -- cgit v1.2.3