def run_handles

bendvy-ecs-core@0.1.0.4 · owned_compose.bend:48

import bendvy-ecs-core@0.1.0.4/owned_compose.bend as OwnedCompose
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import world.bend as W
import transaction.bend as T
import compose.bend as Q

48def run_handles(~S: Data,~Store: Type,~R: Type,~E: Data,~Ops: Type -> Type,~H: Type,~A: Data,~U: Data,~Out: Data,~plan: Plan<S,Store,R,E,Ops,H>,~body: @-H: Type -> @-caps: Ops(H) -> A -> H -> H & (T.Outcome<U> & Out),handles: List<&2,W.Handle<S>>,+args: A,+cursor:Maybe<&2,Tick.Tick>,tx: T.Tx<W.World<S,Store,R,E>,E>) -> T.Tx<W.World<S,Store,R,E>,E> & (T.Outcome<Q.Error<U>> & List<&2,Out>):
49  match handles:
50    case []: (tx,(T.Success{},[]))
51    case handle <> rest: selected(~S,~Store,~R,~E,~Ops,~H,~A,~U,~Out,~plan,~body,args,(tx => run_handles(~S,~Store,~R,~E,~Ops,~H,~A,~U,~Out,~plan,~body,rest,args,cursor,tx)),plan_select(~S,~Store,~R,~E,~Ops,~H,plan)(Q.Frame{tx,handle,None{},cursor}))

Uses (14)

Used by (1)