From 55cb913f029308e97bd262fc18d4338f404e7561 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Feb 2017 12:35:39 +0100 Subject: don't require printing-only notation to be productive --- test-suite/success/Notations.v | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v index 07bbb60c40..32baeaa570 100644 --- a/test-suite/success/Notations.v +++ b/test-suite/success/Notations.v @@ -128,3 +128,7 @@ Notation " |- {{ a }} b" := (a=b) (no associativity, at level 10). Goal True. {{ exact I. }} Qed. + +(* Check that we can have notations without any symbol iff they are "only printing". *) +Fail Notation "" := (@nil). +Notation "" := (@nil) (only printing). -- cgit v1.2.3 From 8ce49dd1b436a17c4ee29c2893133829daac75f0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Feb 2017 12:36:15 +0100 Subject: reject notations that are both 'only printing' and 'only parsing' --- test-suite/success/Notations.v | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v index 32baeaa570..52acad7460 100644 --- a/test-suite/success/Notations.v +++ b/test-suite/success/Notations.v @@ -132,3 +132,6 @@ Qed. (* Check that we can have notations without any symbol iff they are "only printing". *) Fail Notation "" := (@nil). Notation "" := (@nil) (only printing). + +(* Check that a notation cannot be neither parsing nor printing. *) +Fail Notation "'foobarkeyword'" := (@nil) (only parsing, only printing). -- cgit v1.2.3