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
100
101
102
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))