Macro ascent::ascent_run
source · [−]ascent_run!() { /* proc-macro */ }Expand description
Like ascent, except that the result of an ascent_run invocation is a value containing all the relations
defined inside the macro body, and computed to a fixed point.
The advantage of ascent_run compared to ascent is the fact that ascent_run has access to local variables
in scope:
let r = vec![(1,2), (2,3)];
let r_tc = ascent_run!{
relation tc(i32, i32);
tc(x, y) <-- for (x, y) in r.iter();
tc(x, z) <-- for (x, y) in r.iter(), tc(y, z);
}.tc;