def plan

bendvy-ecs-core@0.1.0.4 · ordinary_capture_query.bend:11

import bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend as OrdinaryCaptureQuery
import Base
import bendvy-ecs-core@0.1.0.4/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Decl
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

11# Capture lifecycle reuses Local; each completed run consumes its captured tick.
12# Advanced lowering of the closed query declaration into its typed grant
13# and membership predicate; it performs no traversal or capture mutation.
14def plan(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~Ops:Type -> Type,~A:Data,~U:Data,~Out:Data,~query:Decl.Declaration<S,Q.Frame<S,C,R,E>,Ops(Q.Frame<S,C,R,E>)>,~body:@-H:Type -> @-caps:Ops(H) -> L -> A -> H -> H & (L & (T.Outcome<U> & Out))) -> Q.Plan<S,C,R,E,Ops>:
15  Q.Plan{Decl.grant(~S,~Q.Frame<S,C,R,E>,~Ops(Q.Frame<S,C,R,E>),query),Decl.selector(~S,~Q.Frame<S,C,R,E>,~Ops(Q.Frame<S,C,R,E>),query)}

Uses (7)

Used by (1)