How a change to a child propagates to a parent — the op-aware propagation
seam. When changed keys of child feed parent, the rule decides which of
the parent's keys become dirty:
{:keys, mapped}— a bounded, per-key fan-out (identity or a remap).:all— the change fans out to the WHOLE parent cell (recompute all its keys). Needed when a single input change can affect arbitrary output keys (a fold's aggregate, a vanished key a relation must re-judge).
This one callback generalizes both hosts' propagation:
cascade — a uniform
key_rule: :identity | :allfield per cell::identity→{:keys, changed},:all→:all.- compliance portal — a per-op, per-WHICH-input rule: e.g.
productandrelationreturn:allwhen their fn leg changed but pass keys through when their members leg changed.rule/3seesparent, the specificchild(which input), andchanged, so it can express exactly that.
This module is ALSO the default implementation — the identity rule — so the reference module satisfies its own behaviour; a host provides its own module only for a richer algebra.
Summary
Callbacks
Given a parent cell, the specific child input id whose keys changed, and
the changed keys, return how they propagate to the parent.
Functions
The trivial identity rule — pass the changed keys straight through.
Types
Callbacks
@callback rule( parent :: ReactiveDag.Cell.t(), child :: ReactiveDag.Cell.id(), changed :: [key()] ) :: result()
Given a parent cell, the specific child input id whose keys changed, and
the changed keys, return how they propagate to the parent.
Functions
@spec identity(ReactiveDag.Cell.t(), ReactiveDag.Cell.id(), [key()]) :: result()
The trivial identity rule — pass the changed keys straight through.