pub enum Quant<'a> {
InSet {
binder: Located<'a, &'a str>,
set: Located<'a, &'a str>,
},
Relation {
left: Located<'a, &'a str>,
predicate: Located<'a, &'a str>,
right: Located<'a, &'a str>,
},
}Expand description
A FOR EACH quantifier on a PREMISE/RULE header. It instantiates the
premise’s whole body once per element, substituting the binder. The
quantifier lives in the header (not the body), so there is exactly one per
statement and the body grammar is untouched — a second FOR EACH is
structurally unrepresentable, which is what bounds the desugar to a linear
number of clauses (no domain products).
Variants§
InSet
FOR EACH <binder> IN <set> — range over the elements of a declared
Statement::Set. The binder is the name the body’s atoms refer to.
Fields
Relation
FOR EACH <left> <predicate> <right> — range over the declared FACT
pairs of that relation (e.g. every FACT a linked b), binding left to a
pair’s subject and right to its object. This is the channel for
multi-element constraints (graphs, dependencies): the pair is pinned by
data, so the desugar is linear in the number of facts, never a product.