| 1 |
(* Printing all kinds of Ltac generic arguments *) |
| 2 |
|
| 3 |
Tactic Notation "myidtac" string(v) := idtac v. |
| 4 |
Goal True. |
| 5 |
myidtac "foo". |
| 6 |
Abort. |
| 7 |
|
| 8 |
Tactic Notation "myidtac2" ref(c) := idtac c. |
| 9 |
Goal True. |
| 10 |
myidtac2 True. |
| 11 |
Abort. |
| 12 |
|
| 13 |
Tactic Notation "myidtac3" preident(s) := idtac s. |
| 14 |
Goal True. |
| 15 |
myidtac3 foo. |
| 16 |
Abort. |
| 17 |
|
| 18 |
Tactic Notation "myidtac4" int_or_var(n) := idtac n. |
| 19 |
Goal True. |
| 20 |
myidtac4 3. |
| 21 |
Abort. |
| 22 |
|
| 23 |
Tactic Notation "myidtac5" ident(id) := idtac id. |
| 24 |
Goal True. |
| 25 |
myidtac5 foo. |
| 26 |
Abort. |
| 27 |
|
| 28 |
(* Checking non focussing of idtac for integers *) |
| 29 |
Goal True/\True. split. |
| 30 |
all:let c:=numgoals in idtac c. |
| 31 |
Abort. |
| 32 |
|
| 33 |
(* Checking printing of lists and its focussing *) |
| 34 |
Tactic Notation "myidtac6" constr_list(l) := idtac "<" l ">". |
| 35 |
Goal True/\True. split. |
| 36 |
all:myidtac6 True False Prop. |
| 37 |
(* An empty list is focussing because of interp_genarg of a constr *) |
| 38 |
(* even if it is not focussing on printing *) |
| 39 |
all:myidtac6. |
| 40 |
Abort. |
| 41 |
|
| 42 |
Tactic Notation "myidtac7" int_list(l) := idtac "<<" l ">>". |
| 43 |
Goal True/\True. split. |
| 44 |
all:myidtac7 1 2 3. |
| 45 |
Abort. |