diff options
| author | Matthieu Sozeau | 2018-12-13 17:02:59 +0100 |
|---|---|---|
| committer | Matthieu Sozeau | 2018-12-13 17:02:59 +0100 |
| commit | c5cd2cd4b2b50bb26aeb2b3ebe873c858df27efa (patch) | |
| tree | fbdc2e35e2c22d51ae2502fa2c42f83d7e1de9e3 | |
| parent | 9f4aa15eb94ec4b44a90d1e0832b1da04d857b63 (diff) | |
| parent | da4c116d650cc83171a8cd392307245cac826f73 (diff) | |
Merge PR #9117: Accept argument names for extra arguments with "extra scopes"
| -rw-r--r-- | CHANGES.md | 2 | ||||
| -rw-r--r-- | test-suite/output/Arguments.v | 2 | ||||
| -rw-r--r-- | vernac/vernacentries.ml | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/CHANGES.md b/CHANGES.md index 8cb71f19ea..4fafb9a18a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -88,6 +88,8 @@ Vernacular commands - The `Automatic Introduction` option has been removed and is now the default. +- `Arguments` now accepts names for arguments provided with `extra_scopes`. + Tools - The `-native-compiler` flag of `coqc` and `coqtop` now takes an argument which can have three values: diff --git a/test-suite/output/Arguments.v b/test-suite/output/Arguments.v index 97df40f882..844f96aaa1 100644 --- a/test-suite/output/Arguments.v +++ b/test-suite/output/Arguments.v @@ -51,7 +51,7 @@ Arguments pi _ _%F _%B. Check (forall w : r, pi w $ $ = tt). Fail Check (forall w : r, w $ $ = tt). Axiom w : r. -Arguments w _%F _%B : extra scopes. +Arguments w x%F y%B : extra scopes. Check (w $ $ = tt). Fail Arguments w _%F _%B. 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 = |
