diff options
| author | Maxime Dénès | 2017-11-23 18:09:31 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2017-11-23 18:09:31 +0100 |
| commit | 92c15a9b660b874ce3fa125b1f9bdf2e85c40f47 (patch) | |
| tree | af03fc4e1f9b3e7f38854d9dd9fa83d0d4aa6b66 /test-suite | |
| parent | 167c52c6a15db5e094835244aff3ba76c78b391e (diff) | |
| parent | ab7fd497575b161eeb9bfe89da743b3fbc93aaf3 (diff) | |
Merge PR #6167: Fixing factorization of recursive notations with an atomic separator
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/success/Notations2.v | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test-suite/success/Notations2.v b/test-suite/success/Notations2.v index e86b3edb83..2655b651a0 100644 --- a/test-suite/success/Notations2.v +++ b/test-suite/success/Notations2.v @@ -96,3 +96,12 @@ Check fun A (x :prod' bool A) => match x with ##### 0 _ y 0%bool => 2 | _ => 1 e Notation "'FUNNAT' i => t" := (fun i : nat => i = t) (at level 200). Notation "'Funnat' i => t" := (FUNNAT i => t + i%nat) (at level 200). + +(* 11. Notations with needed factorization of a recursive pattern *) +(* See https://github.com/coq/coq/issues/6078#issuecomment-342287412 *) +Module A. +Notation "[:: x1 ; .. ; xn & s ]" := (cons x1 .. (cons xn s) ..). +Notation "[:: x1 ; .. ; xn ]" := (cons x1 .. (cons xn nil) ..). +Check [:: 1 ; 2 ; 3 ]. +Check [:: 1 ; 2 ; 3 & nil ]. (* was failing *) +End A. |
