tests/test_API_context.v
raw| 1 | From elpi Require Import elpi. |
| 2 | |
| 3 | Elpi Command context. |
| 4 | Elpi Accumulate lp:{{ |
| 5 | main [ctx-decl Ctx] :- !, |
| 6 | coq.env.add-context Ctx. |
| 7 | }}. |
| 8 | |
| 9 | Section CA. |
| 10 | Elpi context Context (a : nat) [b : nat] {c : nat} (d : nat := 3) (e := 4). |
| 11 | Check eq_refl : d = 3. |
| 12 | Check eq_refl : e = 4. |
| 13 | Definition foo := a + b + c + d + e. |
| 14 | End CA. |
| 15 | Print foo. |
| 16 | |
| 17 | Elpi Query lp:{{ |
| 18 | coq.arguments.implicit {coq.locate "foo"} [[explicit, implicit, maximal]]. |
| 19 | }}. |