diff options
| author | Hugo Herbelin | 2020-10-24 14:45:25 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2020-11-20 20:02:35 +0100 |
| commit | 3e6b9a0da40b1302b08a1e34e2f879ba6fd5bb15 (patch) | |
| tree | 3c09e49b3fa3b62056b7b356bdaf891c15e77cf8 /test-suite/output | |
| parent | 7508be4f6d61dd2735ff0b8d406a6a66cd2faad9 (diff) | |
Tests for notations with general single (non-recursive) binders.
Diffstat (limited to 'test-suite/output')
| -rw-r--r-- | test-suite/output/Notations4.out | 12 | ||||
| -rw-r--r-- | test-suite/output/Notations4.v | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test-suite/output/Notations4.out b/test-suite/output/Notations4.out index 86c4b3cccc..df64ae2af3 100644 --- a/test-suite/output/Notations4.out +++ b/test-suite/output/Notations4.out @@ -197,3 +197,15 @@ Found an inductive type while a pattern was expected. : nat * nat %%% : Type +## (x, _) (x = 0) + : Prop +The command has indeed failed with message: +Unexpected type constraint in notation already providing a type constraint. +## '(x, y) (x + y = 0) + : Prop +## x (x = 0) + : Prop +## '(x, y) (x = 0) + : Prop +fun f : ## a (a = 0) => f 1 eq_refl + : ## a (a = 0) -> 1 = 0 diff --git a/test-suite/output/Notations4.v b/test-suite/output/Notations4.v index 6af192ea82..ebc1426fc8 100644 --- a/test-suite/output/Notations4.v +++ b/test-suite/output/Notations4.v @@ -487,3 +487,21 @@ Notation "∀ x .. y , P" := (forall x, .. (forall y, P) ..) Check %%%. End MorePrecise3. + +Module TypedPattern. + +Notation "## x P" := (forall x:nat*nat, P) (x pattern, at level 0). +Check ## (x,y) (x=0). +Fail Check ## ((x,y):bool*bool) (x=y). + +End TypedPattern. + +Module SingleBinder. + +Notation "## x P" := (forall x, x = x -> P) (x binder, at level 0). +Check ## '(x,y) (x+y=0). +Check ## (x:nat) (x=0). +Check ## '((x,y):nat*nat) (x=0). +Check fun (f : ## {a} (a=0)) => f (a:=1) eq_refl. + +End SingleBinder. |
