Repository navigation
Reference 15 then
Explicit, opt-in ordering between two effects that have no data dependency forcing an order:
rule InitiateCharge when Order {
AuditLogEntry from {
order: this
loggedOn: now
}
then
ChargeAttempt from {
order: this
requestedOn: now
}
}
Effects listed without then are unordered — the transpiler/AI-assisted codegen is free to run them in any order or in parallel. Effects joined by then are forced into that order. Ordering that is implied by data dependency (one effect's input is another's output) never needs then — it falls out of the input/output graph for free.
then and from don't compete: then orders statements, from is the form of one statement. There is no one-effect header collapse — a rule whose body is a single effect is simply a one-statement body (## Assignment (mutation in place)'s no-sugar stance extends here). A rule's body is exactly one commit, so then orders effects within that commit — an ordering commitment for compilation, never an observable intermediate state (## rule, "Transactions and after commit").
Reference
- §1 Principles
- §2 Philosophy
- §3 shape
- §4 State and commits
- §5 Scalars
- §6 Relationships (one, many)
- §7 Derived properties
- §8 Refinements (where)
- §9 Composing refinements (and, or)
- §10 Predicate expressions
- §11 rule ... when ... on ...
- §12 Assignment (mutation in place)
- §13 Exit triggers (when leaving)
- §14 for
- §15 then
- §16 Sweeps: rules fire per record
- [[§17 Schedule triggers (on )|Reference-17-Schedule-triggers]]
- §18 Run-once guards
- §19 Self-referential folds and tolerates
- §20 State-change patterns
- §21 never
- §22 Open / unresolved
Normative documents
Guides
Notes