| 1 |
From elpi.apps.NES.elpi Extra Dependency "nes_synterp.elpi" as nes_synterp. |
| 2 |
From elpi.apps.NES.elpi Extra Dependency "nes_interp.elpi" as nes_interp. |
| 3 |
From elpi.apps Require Import NES. |
| 4 |
|
| 5 |
Elpi Command Make. |
| 6 |
#[phase="both"] Elpi Accumulate Db NES.db. |
| 7 |
#[synterp] Elpi Accumulate File nes_synterp. |
| 8 |
#[interp] Elpi Accumulate File nes_interp. |
| 9 |
#[synterp] Elpi Accumulate lp:{{ |
| 10 |
|
| 11 |
main [str Path] :- std.do! [ |
| 12 |
nes.string->ns Path NS, |
| 13 |
nes.begin-path NS OpenNS, |
| 14 |
OpenNS => nes.end-path NS _NewNS, |
| 15 |
]. |
| 16 |
main _ :- coq.error "usage: Make <DotSeparatedPath>". |
| 17 |
|
| 18 |
}}. |
| 19 |
#[interp] Elpi Accumulate lp:{{ |
| 20 |
main _ :- std.do! [ |
| 21 |
nes.begin-path, |
| 22 |
coq.env.add-const "x" {{ 42 }} _ @transparent! _C, |
| 23 |
nes.end-path, |
| 24 |
]. |
| 25 |
}}. |
| 26 |
|
| 27 |
Elpi Export Make. |
| 28 |
|
| 29 |
Make Cats.And.Dogs. |
| 30 |
Print Cats.And.Dogs.x. |