aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-05-21 18:07:48 +0200
committerPierre-Marie Pédrot2014-05-21 18:07:48 +0200
commit3f6c0abc4d434d14d47681e4142ff7b927294f64 (patch)
tree9e8b207454789b08d1c9ddd4e98e75197ba4a272
parent741747c4ecb2be5f51bf5e0395f9fcb28329e86b (diff)
Allowing Ltac definitions that may be unusable because of a built-in
parsing rule.
-rw-r--r--tactics/tacenv.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/tactics/tacenv.ml b/tactics/tacenv.ml
index 6dc11510d4..df01b486c2 100644
--- a/tactics/tacenv.ml
+++ b/tactics/tacenv.ml
@@ -191,15 +191,15 @@ let make_absolute_name ident repl =
else let id = Constrexpr_ops.coerce_reference_to_id ident in
Some id, Lib.make_kn id
in
- if KNmap.mem kn !mactab then
- if repl then id, kn
- else
- Errors.user_err_loc (loc, "",
- str "There is already an Ltac named " ++ pr_reference ident ++ str".")
- else if is_atomic_kn kn then
- Errors.user_err_loc (loc, "",
- str "Reserved Ltac name " ++ pr_reference ident ++ str".")
- else id, kn
+ let () = if KNmap.mem kn !mactab && not repl then
+ Errors.user_err_loc (loc, "",
+ str "There is already an Ltac named " ++ pr_reference ident ++ str".")
+ in
+ let () = if is_atomic_kn kn then
+ msg_warning (str "The Ltac name " ++ pr_reference ident ++
+ str " may be unusable because of a conflict with a notation.")
+ in
+ id, kn
with Not_found ->
Errors.user_err_loc (loc, "",
str "There is no Ltac named " ++ pr_reference ident ++ str ".")