def world_observed

bendvy-ecs-core@0.1.0.4 · ordinary_service_declaration.bend:50

import bendvy-ecs-core@0.1.0.4/ordinary_service_declaration.bend as OrdinaryServiceDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W

50# Advanced availability scan: take and replace the actual slot, returning World
51# with one detached Status. Does not invoke call; trusted lenses must preserve owners.
52def world_observed(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~Rest:Type,~take:R -> Rest & Slot<P>,~put:Rest -> Slot<P> -> R,~call:P -> P,declaration:Declaration<S,R,P,Rest,take,put,call>,world:W.World<S,C,R,E>) -> W.World<S,C,R,E> & List<&2,Status<S>>:
53  match world:
54    case W.World{+ns,allocator,store,resource,+events,pending,+registrations,+nextSystem,+clock}:world_restored(~S,~C,~R,~E,ns,allocator,store,events,pending,registrations,nextSystem,clock,slot_observed(~S,~R,~P,~Rest,~take,~put,~call,declaration,take(resource)))

Uses (8)

Used by (1)