From 3a6b1d2c04ceeb568accbc9ddfc3fc0f14faf25b Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Thu, 17 Aug 2017 12:35:56 +0200 Subject: Respecting the ident/pattern distinction in notation modifiers. --- test-suite/output/Notations3.out | 3 +++ test-suite/output/Notations3.v | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'test-suite/output') diff --git a/test-suite/output/Notations3.out b/test-suite/output/Notations3.out index fb2d375c2..7c47c0885 100644 --- a/test-suite/output/Notations3.out +++ b/test-suite/output/Notations3.out @@ -197,3 +197,6 @@ fun x : nat => if x is n .+ 1 then n else 1 : Set exists2' {{x, y}}, x = 0 & y = 0 : Prop +exists2 x : nat * nat, + let '{{y, z}} := x in y > z & let '{{y, z}} := x in z > y + : Prop diff --git a/test-suite/output/Notations3.v b/test-suite/output/Notations3.v index 46e0c1b1b..ee6f0a09e 100644 --- a/test-suite/output/Notations3.v +++ b/test-suite/output/Notations3.v @@ -338,9 +338,16 @@ Check fun x => if x is n.+1 then n else 1. Check {(x,y)|x+y=0}. +Module D. Notation "'exists2'' x , p & q" := (ex2 (fun x => p) (fun x => q)) (at level 200, x pattern, p at level 200, right associativity, format "'[' 'exists2'' '/ ' x , '/ ' '[' p & '/' q ']' ']'") : type_scope. Check exists2' (x,y), x=0 & y=0. +End D. + +(* Ensuring for reparsability that printer of notations does not use a + pattern where only an ident could be reparsed *) + +Check ex2 (fun x => let '(y,z) := x in y>z) (fun x => let '(y,z) := x in z>y). -- cgit v1.2.3