| 1 |
Disable Notation "x + y" := (Nat.add x y). |
| 2 |
|
| 3 |
Declare Custom Entry foo. |
| 4 |
Notation "x * y" := (Nat.mul x y) (in custom foo at level 2). |
| 5 |
Fail Disable Notation "x * y" := (Nat.mul x y). (* need flag all *) |
| 6 |
Disable Notation "x * y" := (Nat.mul x y) (all). |
| 7 |
Enable Notation := (Nat.mul _ _) : nat_scope. |
| 8 |
|
| 9 |
Disable Notation := ex2 (all). |
| 10 |
Disable Notation "<=" (all). |
| 11 |
Disable Notation (all) : nat_scope. |
| 12 |
Fail Disable Notation. |
| 13 |
|
| 14 |
Module Abbrev. |
| 15 |
Set Warnings "+no-notation-to-enable-or-disable". |
| 16 |
Fail Disable Notation f. (* no abbreviation with such suffix *) |
| 17 |
Set Warnings "no-notation-to-enable-or-disable". |
| 18 |
Abbreviation f w := (S w). |
| 19 |
Disable Notation f w := (S w). |
| 20 |
Enable Notation := (S _). |
| 21 |
|
| 22 |
Module A. Abbreviation a := Prop. End A. Include A. |
| 23 |
Disable Notation A.a. |
| 24 |
Check a. |
| 25 |
Disable Notation a. |
| 26 |
Fail Check a. |
| 27 |
Check Prop. |
| 28 |
Enable Notation a (all). (* Note: reactivation is not necessarily in the same order as it was earlier *) |
| 29 |
Check a. |
| 30 |
Check Prop. |
| 31 |
|
| 32 |
Module Shadowed. Abbreviation x := true. End Shadowed. |
| 33 |
Import Shadowed. |
| 34 |
Abbreviation x := 0. |
| 35 |
Check x. |
| 36 |
Disable Notation Abbrev.x. |
| 37 |
Check x. |
| 38 |
Enable Notation x. |
| 39 |
Check x. |
| 40 |
|
| 41 |
End Abbrev. |
| 42 |
|
| 43 |
Module Bug17782. |
| 44 |
|
| 45 |
Declare Custom Entry trm. |
| 46 |
Set Warnings "+no-notation-to-enable-or-disable". |
| 47 |
Fail Disable Notation "'foo' _" (in custom trm). |
| 48 |
Set Warnings "no-notation-to-enable-or-disable". |
| 49 |
|
| 50 |
End Bug17782. |