aboutsummaryrefslogtreecommitdiff
path: root/test-suite/output/Notations.v
diff options
context:
space:
mode:
authorHugo Herbelin2020-07-11 20:02:44 +0200
committerHugo Herbelin2020-07-12 10:05:25 +0200
commit8b971260dc6381f4eaa004056c53302f291aef7e (patch)
treec0962f6ef7966e06e324f20aab7a62162b7d88b3 /test-suite/output/Notations.v
parentf4593ab277c12eda7e000011eeb2276716ac9a09 (diff)
Fixes #12682 (recursive notation printing bug with n-ary applications).
A special case for recursive n-ary applications was missing when the head of the application was a reference.
Diffstat (limited to 'test-suite/output/Notations.v')
-rw-r--r--test-suite/output/Notations.v25
1 files changed, 22 insertions, 3 deletions
diff --git a/test-suite/output/Notations.v b/test-suite/output/Notations.v
index 7d2f1e9ba8..d0b2f40f9c 100644
--- a/test-suite/output/Notations.v
+++ b/test-suite/output/Notations.v
@@ -216,13 +216,32 @@ Check [|0*(1,2,3);(4,5,6)*false|].
(**********************************************************************)
(* Test recursive notations involving applications *)
-(* Caveat: does not work for applied constant because constants are *)
-(* classified as notations for the particular constant while this *)
-(* generic application notation is classified as generic *)
+
+Module Application.
Notation "{| f ; x ; .. ; y |}" := ( .. (f x) .. y).
+
+(* Application to a variable *)
+
Check fun f => {| f; 0; 1; 2 |} : Z.
+(* Application to a fun *)
+
+Check {| (fun x => x+x); 0 |}.
+
+(* Application to a reference *)
+
+Axiom op : Z -> Z -> Z.
+Check {| op; 0; 1 |}.
+
+(* Interaction with coercion *)
+
+Axiom c : Z -> bool.
+Coercion c : Z >-> bool.
+Check false = {| c; 0 |}.
+
+End Application.
+
(**********************************************************************)
(* Check printing of notations from other modules *)