aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorMaxime Dénès2018-11-30 14:37:43 +0100
committerMaxime Dénès2018-12-12 18:10:25 +0100
commitda4c116d650cc83171a8cd392307245cac826f73 (patch)
tree59b5c0dc32e837f8fd4844fa09a212c5a426a9a2 /vernac
parentdfd4c4a2b50edf894a19cd50c43517e1804eadc9 (diff)
Accept argument names for extra arguments with "extra scopes"
The checks were unnecessarily restrictive (since names can be used for documentation purposes), and the error message was a bit wrong (it mentioned a restriction on the explicit status of arguments).
Diffstat (limited to 'vernac')
-rw-r--r--vernac/vernacentries.ml8
1 files changed, 3 insertions, 5 deletions
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml
index 3fa3681661..c6c6f74152 100644
--- a/vernac/vernacentries.ml
+++ b/vernac/vernacentries.ml
@@ -1221,11 +1221,9 @@ let vernac_arguments ~section_local reference args more_implicits nargs_for_red
let rec check_extra_args extra_args =
match extra_args with
| [] -> ()
- | { notation_scope = None } :: _ -> err_extra_args (names_of extra_args)
- | { name = Anonymous; notation_scope = Some _ } :: args ->
- check_extra_args args
- | _ ->
- user_err Pp.(str "Extra notation scopes can be set on anonymous and explicit arguments only.")
+ | { notation_scope = None } :: _ ->
+ user_err Pp.(str"Extra arguments should specify a scope.")
+ | { notation_scope = Some _ } :: args -> check_extra_args args
in
let args, scopes =