| 1 |
Declare Custom Entry stlc. |
| 2 |
|
| 3 |
Module Bug18342. |
| 4 |
Definition A (T : True) := 0. |
| 5 |
Notation "?" := A. |
| 6 |
|
| 7 |
Notation "<{ e }>" := e (e custom stlc at level 99). |
| 8 |
Notation "x" := x (in custom stlc at level 0, x constr at level 0). |
| 9 |
Notation "'SS' x" := (S x) (in custom stlc at level 89, x custom stlc at level 99). |
| 10 |
|
| 11 |
Check <{SS (? I)}>. |
| 12 |
End Bug18342. |
| 13 |
|
| 14 |
Declare Custom Entry qmark. |
| 15 |
|
| 16 |
Module Bug18342VariantWithExplicitCoercions. |
| 17 |
Definition A (T : True) := 0. |
| 18 |
|
| 19 |
Notation "?" := A (in custom qmark). |
| 20 |
Notation "{{ x }}" := x (x custom qmark). |
| 21 |
|
| 22 |
Notation "<{ e }>" := e (e custom stlc at level 99). |
| 23 |
Notation "[[ x ]]" := x (in custom stlc at level 0, x constr). |
| 24 |
Notation "'SS' x" := (S x) (in custom stlc at level 89, x custom stlc at level 99). |
| 25 |
|
| 26 |
Check <{SS [[{{?}} I]]}>. |
| 27 |
End Bug18342VariantWithExplicitCoercions. |
| 28 |
|
| 29 |
Module Bug18342VariantPattern. |
| 30 |
Inductive I := C : nat -> I | D : I -> I. |
| 31 |
|
| 32 |
Notation "?" := C (in custom qmark). |
| 33 |
Notation "{{ x }}" := x (x custom qmark). |
| 34 |
|
| 35 |
Notation "<{ e }>" := e (e custom stlc at level 99). |
| 36 |
Notation "[[ x ]]" := x (in custom stlc at level 0, x constr). |
| 37 |
Notation "'DD' x" := (D x) (in custom stlc at level 89, x custom stlc at level 99). |
| 38 |
|
| 39 |
Check fun x => match x with <{DD [[{{?}} y]]}> => y | _ => 0 end. |
| 40 |
End Bug18342VariantPattern. |