apps/eltac/theories/intro.v
raw| 1 | From elpi Require Export elpi. |
| 2 | |
| 3 | Elpi Tactic intro. |
| 4 | Elpi Accumulate lp:{{ |
| 5 | |
| 6 | solve (goal _ _ _ _ [str ID] as G) GS :- !, |
| 7 | std.assert! (coq.ltac.id-free? ID G) "name already taken", |
| 8 | coq.id->name ID N, |
| 9 | refine (fun N _ _) G GS. |
| 10 | |
| 11 | solve _ _ :- usage. |
| 12 | |
| 13 | usage :- coq.error "Usage: eltac.intro". |
| 14 | |
| 15 | }}. |
| 16 | |
| 17 | |
| 18 | |
| 19 | Tactic Notation "eltac.intro" string(ID) := elpi intro ltac_string:(ID). |
| 20 | Tactic Notation "eltac.intro" ident(ID) := elpi intro ltac_string:(ID). |