Hello. I have difficulties reasoning about spills. I have a block of Elpi predicates to be called under a condition, and this block contains spills. Are they desugared to calls before the if
or inside the branch?
For instance, does
if Condition (F {x}) Other
desugar to
if Condition (x A, F A) Other
or
x A, if Condition (F A) Other
?
The rule is not very satisfactory, but here it is: the spilled term is grafted just before the first term of type prop
going from its position outward.
In your case, if F _
is a prop
, then F {x}
is rewritten to (x TMP, F TMP)
.
You can use Elpi Print some_elpi_command_name
to see the actual program, or if you are in plain elpi there is something like -print-ast
Last updated: Oct 13 2024 at 01:02 UTC