def finished_observed

bendvy-ecs-core@0.1.0.4 · ordinary_resource_system.bend:99

import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as OrdinaryResourceSystem
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
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/commands.bend as Cmd

99# Same user body and grants, with detached transaction facts returned beside it.
100# Advanced runner finish adapter retaining detached transaction facts separately
101# from World outcome. Same commit/rollback and failure-Out disposal as runner;
102# attempted facts are not evidence that failed transaction writes committed.
103def finished_observed(~S:Data,~C:Type,~R:Type,~E:Data,~Error:Data,~Out:Type,result:T.Tx<W.World<S,C,R,E>,E> & (T.Outcome<Error> & Out)) -> Sys.Outcome<W.World<S,C,R,E>,Error,Out> & TraceFacts.State:
104  match result:
105    case (tx,(outcome,output)):returned_observed(~S,~C,~R,~E,~Error,~Out,output,T.finish_observed(~W.World<S,C,R,E>,~E,~Error,~Cmd.enqueue(~S,~C,~R,~E),~Cmd.publish(~S,~C,~R,~E),tx,outcome))

Uses (11)

Used by (1)