def failed_positions

bendvy-ecs-core@0.1.0.4 · owned_event_runtime.bend:38

import bendvy-ecs-core@0.1.0.4/owned_event_runtime.bend as OwnedEventRuntime
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/owned_event_storage.bend as Storage

38# Ev.run performs the existing namespace + registration checks and lazy activation.
39# The closed runner transports semantic failure separately so affine output is
40# returned. Restore exactly Ev.run_outcome's failed-reader position afterward.
41def failed_positions(~S:Data,~C:Type,~R:Type,~P:Type,old:List<&2,Ev.Position>,id:U32,runtime:Ev.Runtime<S,C,Storage.Resources<R,P>,Nat>) -> Ev.Runtime<S,C,Storage.Resources<R,P>,Nat>:
42  match runtime:
43    case Ev.Runtime{world,namespace,batches,_,nextReader,+tick,frameStart,boundary,capacity,dropped}:
44      Ev.Runtime{world,namespace,batches,Ev.activate(old,id,Nat.sub(tick,1n)),nextReader,tick,frameStart,boundary,capacity,dropped}

Uses (8)

Used by (1)