def index
import bendvy-ecs-core@0.1.0.4/ordinary_app_event_runtime.bend as OrdinaryAppEventRuntimeimport Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/ordinary_app_access.bend as Access
39# Return App and optional grouped registration/event access inventory. Disabled
40# bypasses both folds; enabled threads actual owners through generated folds.
41# Inventory metadata is not a gameplay grant or an event acknowledgement.
42def index(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:H -> H & List<&2,Records.Fields<S>>,~Events:Type,~eventFold:Events -> Events & List<&2,Access.Entry>,app:Application<S,C,R,E,H,Rows,observe,fold,Events,eventFold>) -> Application<S,C,R,E,H,Rows,observe,fold,Events,eventFold> & Maybe<&2,List<&2,Access.Entry>>:
43 match app:
44 case Application{schema,runtime,owners,recipe,events,False{}}:(Application{schema,runtime,owners,recipe,events,False{}},None{})
45 case Application{schema,runtime,owners,recipe,events,True{}}:indexed(~S,~C,~R,~E,~H,~Rows,~observe,~fold,~Events,~eventFold,schema,runtime,recipe,fold(owners),eventFold(events))
Uses (11)
Used by (0)
No other definition uses this definition.