def run_observed_with

bendvy-ecs-core@0.1.0.4 · system.bend:149

import bendvy-ecs-core@0.1.0.4/system.bend as System
import Base
import bendvy-ecs-core@0.1.0.4/trace_facts.bend as TraceFacts
import bendvy-ecs-core@0.1.0.4/world.bend as W

149# Trusted transport for an observed runner and custom completion policy.
150# Validates registration before invoking observed; refusal returns original
151# Args/owners and trace. finish receives the executed cursor; raw callbacks must
152# preserve their relationship to runner and its transaction contract.
153def run_observed_with(~S:Data,~C:Type,~R:Type,~E:Data,~Args:Type,~Error:Data,~Output:Type,~runner:W.World<S,C,R,E> -> Args -> Outcome<W.World<S,C,R,E>,Error,Output>,~observed:TraceFacts.State -> W.World<S,C,R,E> -> Args -> Outcome<W.World<S,C,R,E>,Error,Output> & TraceFacts.State,~finish:Registry<S,C,R,E,Args,Error,Output,runner> -> Outcome<W.World<S,C,R,E>,Error,Output> -> RunResult<S,C,R,E,Args,Error,Output,runner>,registry:Registry<S,C,R,E,Args,Error,Output,runner>,trace:TraceFacts.State,world:W.World<S,C,R,E>,args:Args) -> RunResult<S,C,R,E,Args,Error,Output,runner> & TraceFacts.State:
154  observed_named_with(~S,~C,~R,~E,~Args,~Error,~Output,~runner,~observed,~finish,registry,trace,W.namespace(~S,~C,~R,~E,world),args)

Uses (8)

Used by (1)