def pair
import bendvy-ecs-core@0.1.0.4/recognized_query_declaration.bend as RecognizedQueryDeclarationimport 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 N
import bendvy-ecs-core@0.1.0.4/internal/compact_operational_frame.bend as F
72# Combine two declarations for the same schema/store/resource owners.
73# The body receives (leftCaps, rightCaps) in that order. Selection runs left first;
74# if it returns False, right is not called, and the returned owner is preserved.
75# The ordinary form keeps the same clause order, including duplicate clauses;
76# this does not promise that two grants refer to disjoint component columns.
77def pair(~S:Data,~Store:Type,~R:Type,~E:Data,~L:Type -> Type,~Right:Type -> Type,~left:Declaration<S,Store,R,E,L>,~right:Declaration<S,Store,R,E,Right>) -> Declaration<S,Store,R,E,H => L(H) & Right(H)>:
78 Declaration{_=>N.pair(~S,~Q.Frame<S,Store,R,E>,~L(Q.Frame<S,Store,R,E>),~Right(Q.Frame<S,Store,R,E>),~ordinary(~S,~Store,~R,~E,~L,left),~ordinary(~S,~Store,~R,~E,~Right,right)),_=>pair_caps(~S,~Store,~R,~E,~L,~Right,~left,~right),F.both(~S,~Store,~R,~E,~selector(~S,~Store,~R,~E,~L,left),~selector(~S,~Store,~R,~E,~Right,right))}
Uses (8)
Used by (0)
No other definition uses this definition.