def finish_observed

bendvy-ecs-core@0.1.0.4 · transaction.bend:115

import bendvy-ecs-core@0.1.0.4/transaction.bend as Transaction
import Base
import bendvy-ecs-core@0.1.0.4/deferred_command.bend as Deferred
import bendvy-ecs-core@0.1.0.4/trace_facts.bend as TraceFacts

115# Finish with the same commit/rollback behavior as finish, also returning
116# trace facts settled with the actual transaction decision. Returned facts are
117# observations, not additional changes to apply or undo.
118def finish_observed(~W:Type,~E:Data,~Error:Data,~enqueue:W -> List<&1,Deferred.Command<W>> -> W,~publish:W -> List<&2,E> -> W,tx:Tx<W,E>,+outcome:Outcome<Error>) -> Returned<W,Error> & TraceFacts.State:
119  match tx:
120    case Tx{world,undo,commands,events,trace}:(finish_world(~W,~E,~Error,~enqueue,~publish,world,undo,commands,events,outcome),TraceFacts.settle(trace,committed(~Error,outcome)))

Uses (11)

Used by (3)