| 1 |
(* Example from #9521 *) |
| 2 |
Declare Custom Entry expr. |
| 3 |
|
| 4 |
Module A. |
| 5 |
|
| 6 |
Notation "expr0:( s )" := s (s custom expr at level 0). |
| 7 |
Notation "#" := 0 (in custom expr at level 0). |
| 8 |
Check expr0:(#). (* Should not be an anomaly "unknown level 0" *) |
| 9 |
|
| 10 |
End A. |
| 11 |
|
| 12 |
(* Another example from a comment at #11561 *) |
| 13 |
|
| 14 |
Module B. |
| 15 |
|
| 16 |
Declare Custom Entry special. |
| 17 |
Notation "## x" := (S x) (in custom expr at level 10, x custom special at level 10). |
| 18 |
Notation "[ e ]" := e (e custom expr at level 10). |
| 19 |
Notation "1" := 1 (in custom special). |
| 20 |
Check [ ## 1 ]. |
| 21 |
|
| 22 |
End B. |