tests/test_ltac3.v
raw| 1 | From elpi Require Export elpi. |
| 2 | From Corelib Require Import ssreflect ssrfun ssrbool. |
| 3 | |
| 4 | Ltac ltac_foo := cut True; [ idtac | abstract (exact I) ]. |
| 5 | |
| 6 | Record fooType := Foo { sort :> Type; }. |
| 7 | Canonical unit_fooType := Foo unit. |
| 8 | |
| 9 | Elpi Tactic fail_foo. |
| 10 | Elpi Accumulate lp:{{ |
| 11 | |
| 12 | solve (goal _ _ _ _ [_] as G) GS :- |
| 13 | coq.ltac.call "ltac_foo" [] G GS ok. |
| 14 | |
| 15 | }}. |
| 16 | |
| 17 | |
| 18 | Goal nat. |
| 19 | Proof. |
| 20 | elpi fail_foo ([the fooType of unit : Type]). |
| 21 | exact (fun _ => 0). |
| 22 | Qed. |