def finish_checked

bendvy-ecs-core@0.1.0.4 · relation_cleanup.bend:29

import bendvy-ecs-core@0.1.0.4/relation_cleanup.bend as RelationCleanup
import Base
import relation_commands.bend as A
import world.bend as W

29# A paused continuation may outlive its full entity key. Validate before clear.
30def finish_checked(~S:Data,~C:Type,~R:Type,~E:Data,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,checked:W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & Bool,handle:W.Handle<S>) -> W.World<S,A.Store<S,C>,R,A.Notice<S,E>>:
31  match checked:
32    case (world,False{}):world
33    case (world,True{}):finish_live(~S,~C,~R,~E,~clear,~record,world,handle)

Uses (9)

Used by (1)