Open FissoreD opened 4 months ago
Thanks for opening the issue.
I think the desired solution is to use some constant, say the-key
, instead of _
, eg declare_constraint (p X) [X,the-key]
to get it resumed when X
materializes and combined via CHR rules with all the other constraints about X
or about the-key
.
https://github.com/LPCIC/elpi/blob/4cac107eab2acb7aaad5390e9b32eb5ef139323d/src/runtime.ml#L3402
[_]
is used typically to retrieve all the goals suspended for a given predicate. The use of[_]
can lead to goal resolution issue if the_
is accidentally instantiated. For example, the following code raise a failure:The premise with the
spy-do!
fails, whereas the same premise without thespy-do!
succeeds