Why this fires¶
An override patches selected operations of an existing complete handler. The selector must resolve to a visible effect declaration, exist in the base's proven operation set, and appear at most once. Parameters and callback results use the operation's instantiated signature. The handler's answer is preserved; it is the enclosing installation result, not the callback's resume result.
let test_world = real_world with { Clock::now() => fixed_time }
with test_world { run_application() }Composition keeps the original arm closures and their frame identities.
An arm that uses abort needs lexical nested handlers instead. The initial
implementation requires a positively checked resume-only origin: handler
literals, immutable aliases, previously checked patches and declaring factories
whose checked tail returns a complete handler. Local factory tails and selected
imports/reexports preserve the original declaration and its parent captures.
An erased value,
cast, mutable binding, handler parameter or opaque factory return cannot prove
that contract. No operation is inferred from a matching name alone.
Operation signatures and captured values must be concrete and non-linear. Uninstantiated generic signatures, erased ownership and captures containing callables or handlers have no proven continuation origin. This includes an ordinary helper call, whether its name is bare or qualified. Use a lexical nested handler for these contracts or for an original-frame abort. An opaque factory whose body only forwards a handler parameter does not establish an actual composition origin.
Change an invalid selector to a visible operation of the base, correct the parameter/body types, or install separate handlers lexically when abort routing is required. A selector rename suggestion replaces only its operation identifier.