diff options
author | 2017-11-23 13:30:36 +0100 | |
---|---|---|
committer | 2018-02-20 10:03:07 +0100 | |
commit | 0c4eea2553d5b3b70d0b5baaf92781a544de83bd (patch) | |
tree | c39bf3bff29cd7b8bb68b503ce53df7e6f382215 /test-suite/output/Notations3.v | |
parent | dcfd5c2c2cefcd8ae6a5b2e90fcbd98da4f1b120 (diff) |
Change default for notations with variables bound to both terms and binders.
For compatibility, the default is to parse as ident and not as pattern.
Diffstat (limited to 'test-suite/output/Notations3.v')
-rw-r--r-- | test-suite/output/Notations3.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test-suite/output/Notations3.v b/test-suite/output/Notations3.v index 9ea218481..df3d86793 100644 --- a/test-suite/output/Notations3.v +++ b/test-suite/output/Notations3.v @@ -389,3 +389,15 @@ Notation "'if' c 'is' p 'then' u 'else' v" := (at level 200, p pattern at level 100). Check fun p => if p is S n then n else 0. Check fun p => if p is Lt then 1 else 0. + +(* Check that mixed binders and terms defaults to ident and not pattern *) +Module E. + (* First without an indirection *) +Notation "[ n | t ]" := (n, (fun n : nat => t)). +Check fun S : nat => [ S | S+S ]. +Check fun N : nat => (N, (fun n => n+0)). (* another test in passing *) + (* Then with an indirection *) +Notation "[[ n | p | t ]]" := (n, (fun p : nat => t)). +Notation "[[ n | t ]]" := [[ n | n | t ]]. +Check fun S : nat => [[ S | S+S ]]. +End E. |