| 1 |
From elpi Require Import elpi xml. |
| 2 |
|
| 3 |
From elpi.xml.tests Extra Dependency "test.xml" as xml_test_file. |
| 4 |
|
| 5 |
Elpi Command hello_xml. |
| 6 |
Elpi Accumulate Plugin "xml.elpi". |
| 7 |
Elpi Accumulate lp:{{ |
| 8 |
main [str D] :- |
| 9 |
std.assert-ok! (coq.extra-dep->xml D J) "bad file", |
| 10 |
coq.say "xml AST:" J, |
| 11 |
coq.xml->string J S, |
| 12 |
coq.say "pretty:" S, |
| 13 |
coq.string->xml S J', |
| 14 |
coq.say "xml AST:" J', |
| 15 |
std.assert! (J = J') "this would be bad". |
| 16 |
}}. |
| 17 |
Elpi Export hello_xml. |
| 18 |
|
| 19 |
hello_xml "xml_test_file". |