ordinary_event_family.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.7/ordinary_event_family.bend as Ordinary_event_family
6 imports
import Base import owner_product.bend as Product import ordinary_event_declaration.bend as Event import event_runtime.bend as Ev import event_stream.bend as Leaf import event_publication.bend as Publication
Types
type Domains source · line 11 · raw
@A:Data -> @B:Data -> Data
Builder domains are operational declarations, not a second metadata list. Detached left/right domain declarations for a heterogeneous event family. Their nested shape matches the publication and storage product, not live readers.
Domains@A:Data -> @B:Data -> @first:A -> @second:B -> Domains<A, B>
Builder domains are operational declarations, not a second metadata list. Detached left/right domain declarations for a heterogeneous event family. Their nested shape matches the publication and storage product, not live readers.
type Provision source · line 16 · raw
@S:Data -> @P:Data -> @D:Data -> @F:Type -> @-make:(@_:D -> @_:Nat -> F) -> @-sync:(@_:F -> @_:Nat -> @_:List<&2, P> -> F) -> @-frame:(@_:F -> @_:Nat -> F) -> @-retain:(@_:F -> @_:Nat -> @_:List<&2, P> -> Pair(F, List<&2, P>)) -> @-inventory:(@_:F -> Pair(F, List<&2, String>)) -> Data
Typed family setup containing ordinary domains and closed storage/routing operations. Runtime streams are constructed separately; this declaration supplies no live cursor or affine payload. Raw constructors are trusted setup. Family construction and reader lifecycle: docs/parity/typed-data-events.md.
Provision@S:Data -> @P:Data -> @D:Data -> @F:Type -> @-make:(@_:D -> @_:Nat -> F) -> @-sync:(@_:F -> @_:Nat -> @_:List<&2, P> -> F) -> @-frame:(@_:F -> @_:Nat -> F) -> @-retain:(@_:F -> @_:Nat -> @_:List<&2, P> -> Pair(F, List<&2, P>)) -> @-inventory:(@_:F -> Pair(F, List<&2, String>)) -> @domains:D -> Provision<S, P, D, F, make, sync, frame, retain, inventory>
type Selection source · line 98 · raw
@S:Data -> @E:Data -> @F:Type -> @-take:(@_:F -> Pair(F, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @-put:(@_:F -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> F) -> Data
Typed path to one event stream in a family, with owner-threading take/put operations. This Data path owns no stream or reader; raw indices are trusted setup. Equal payload types do not justify substituting unrelated family paths.
Selection@S:Data -> @E:Data -> @F:Type -> @-take:(@_:F -> Pair(F, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @-put:(@_:F -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> F) -> Selection<S, E, F, take, put>
Typed path to one event stream in a family, with owner-threading take/put operations. This Data path owns no stream or reader; raw indices are trusted setup. Equal payload types do not justify substituting unrelated family paths.
Templates
template leaf_make source · line 18 · raw
@-S:Data -> @-E:Data -> @domain:0x7e321819d0ff210531780719c7674cef/ordinary_event_declaration.Domain<S, E> -> @capacity:Nat -> 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>
template leaf_sync source · line 19 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> @tick:Nat -> @values:List<&2, E> -> 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>
template leaf_frame source · line 20 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> @tick:Nat -> 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>
template leaf_retained source · line 21 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> @remove:Bool -> @values:List<&2, E> -> Pair(0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, List<&2, E>)
template leaf_retain source · line 25 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> @tick:Nat -> @values:List<&2, E> -> Pair(0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, List<&2, E>)
template leaf_inventory source · line 28 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> Pair(0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, List<&2, String>)
template leaf source · line 35 · raw
@-S:Data -> @-E:Data -> @domain:0x7e321819d0ff210531780719c7674cef/ordinary_event_declaration.Domain<S, E> -> Provision<S, E, 0x7e321819d0ff210531780719c7674cef/ordinary_event_declaration.Domain<S, E>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, leaf_make(S, E), leaf_sync(S, E), leaf_frame(S, E), leaf_retain(S, E), leaf_inventory(S, E)>
Declare one Data event family leaf from its schema-scoped domain. The resulting provision supplies stream creation, synchronization and retention operations, but does not create a stream until runtime setup invokes make. Example: Family.leaf(~S,~E,Event.domain(~S,~E,"hit")).
template pair_make source · line 36 · raw
@-DA:Data -> @-DB:Data -> @-FA:Type -> @-FB:Type -> @-makeA:(@_:DA -> @_:Nat -> FA) -> @-makeB:(@_:DB -> @_:Nat -> FB) -> @domains:Domains<DA, DB> -> @+capacity:Nat -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template pair_sync source · line 39 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-syncA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> FA) -> @-syncB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> FB) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @+tick:Nat -> @+records:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template pair_frame source · line 42 · raw
@-FA:Type -> @-FB:Type -> @-frameA:(@_:FA -> @_:Nat -> FA) -> @-frameB:(@_:FB -> @_:Nat -> FB) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @+tick:Nat -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template pair_inventory_join source · line 45 · raw
@-FA:Type -> @-FB:Type -> @first:Pair(FA, List<&2, String>) -> @second:Pair(FB, List<&2, String>) -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, String>)
template pair_inventory source · line 49 · raw
@-FA:Type -> @-FB:Type -> @-inventoryA:(@_:FA -> Pair(FA, List<&2, String>)) -> @-inventoryB:(@_:FB -> Pair(FB, List<&2, String>)) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, String>)
template retained_tail source · line 52 · raw
@-A:Data -> @-B:Data -> @-F:Type -> @record:0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B> -> @returned:Pair(F, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>) -> Pair(F, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template retained_children source · line 55 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @rest:(@_:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)) -> @first:Pair(FA, List<&2, A>) -> @second:Pair(FB, List<&2, B>) -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template retained_record source · line 59 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @rest:(@_:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)) -> @+tick:Nat -> @record:0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B> -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template retained_one_children source · line 62 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @first:Pair(FA, List<&2, A>) -> @second:Pair(FB, List<&2, B>) -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>)
template retained_one source · line 66 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @+tick:Nat -> @record:0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B> -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>)
template pair_retain_acc source · line 69 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @records:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> @returned:Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>) -> @+tick:Nat -> @reversed:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template pair_retain_loop source · line 77 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @records:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @+tick:Nat -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template pair_retain source · line 81 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @tick:Nat -> @records:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>>)
template node_make source · line 84 · raw
@-DA:Data -> @-DB:Data -> @-FA:Type -> @-FB:Type -> @-makeA:(@_:DA -> @_:Nat -> FA) -> @-makeB:(@_:DB -> @_:Nat -> FB) -> @domains:Domains<DA, DB> -> @capacity:Nat -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template node_sync source · line 85 · raw
@-A:Data -> @-B:Data -> @-FA:Type -> @-FB:Type -> @-syncA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> FA) -> @-syncB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> FB) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @tick:Nat -> @records:List<&2, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>> -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template node_frame source · line 86 · raw
@-FA:Type -> @-FB:Type -> @-frameA:(@_:FA -> @_:Nat -> FA) -> @-frameB:(@_:FB -> @_:Nat -> FB) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @tick:Nat -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template branch source · line 91 · raw
@-S:Data -> @-A:Data -> @-B:Data -> @-DA:Data -> @-DB:Data -> @-FA:Type -> @-FB:Type -> @-makeA:(@_:DA -> @_:Nat -> FA) -> @-makeB:(@_:DB -> @_:Nat -> FB) -> @-syncA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> FA) -> @-syncB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> FB) -> @-frameA:(@_:FA -> @_:Nat -> FA) -> @-frameB:(@_:FB -> @_:Nat -> FB) -> @-retainA:(@_:FA -> @_:Nat -> @_:List<&2, A> -> Pair(FA, List<&2, A>)) -> @-retainB:(@_:FB -> @_:Nat -> @_:List<&2, B> -> Pair(FB, List<&2, B>)) -> @-inventoryA:(@_:FA -> Pair(FA, List<&2, String>)) -> @-inventoryB:(@_:FB -> Pair(FB, List<&2, String>)) -> @first:Provision<S, A, DA, FA, makeA, syncA, frameA, retainA, inventoryA> -> @second:Provision<S, B, DB, FB, makeB, syncB, frameB, retainB, inventoryB> -> Provision<S, 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>, Domains<DA, DB>, 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, node_make(DA, DB, FA, FB, makeA, makeB), node_sync(A, B, FA, FB, syncA, syncB), node_frame(FA, FB, frameA, frameB), pair_retain(A, B, FA, FB, retainA, retainB), pair_inventory(FA, FB, inventoryA, inventoryB)>
Compose two event provisions under the same schema in left/right order. Publication wrappers and family storage become matching nested products; each leaf retains its own typed stream. Composition neither publishes records nor combines independent reader cursors into one. Nest branches for more types.
template selected_leaf source · line 99 · raw
@-S:Data -> @-E:Data -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> Pair(0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)
template replaced_leaf source · line 102 · raw
@-S:Data -> @-E:Data -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>
template select_leaf source · line 105 · raw
@-S:Data -> @-E:Data -> Selection<S, E, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>, selected_leaf(S, E), replaced_leaf(S, E)>
Select a stream that is itself the complete family owner. The selection records closed extraction/replacement operations and performs neither here.
template selected_left source · line 106 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @second:FB -> @returned:Pair(FA, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>) -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)
template left_take source · line 109 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-take:(@_:FA -> Pair(FA, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)
template left_put source · line 112 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-put:(@_:FA -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> FA) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template selected_right source · line 115 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @first:FA -> @returned:Pair(FB, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>) -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)
template right_take source · line 118 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-take:(@_:FB -> Pair(FB, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> Pair(0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)
template right_put source · line 121 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-put:(@_:FB -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> FB) -> @family:0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB> -> @stream:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>
template select_left source · line 127 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-take:(@_:FA -> Pair(FA, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @-put:(@_:FA -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> FA) -> @_:Selection<S, E, FA, take, put> -> Selection<S, E, 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, left_take(S, E, FA, FB, take), left_put(S, E, FA, FB, put)>
Lift a leaf selection through the left side of a family product. The generated path preserves the right sibling when accessing/replacing the selected stream; it does not allocate or advance a reader.
template select_right source · line 130 · raw
@-S:Data -> @-E:Data -> @-FA:Type -> @-FB:Type -> @-take:(@_:FB -> Pair(FB, 0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E>)) -> @-put:(@_:FB -> @_:0x7e321819d0ff210531780719c7674cef/event_stream.Stream<S, E> -> FB) -> @_:Selection<S, E, FB, take, put> -> Selection<S, E, 0x7e321819d0ff210531780719c7674cef/owner_product.Owner<FA, FB>, right_take(S, E, FA, FB, take), right_put(S, E, FA, FB, put)>
Lift a leaf selection through the right side of a family product, preserving the left sibling. Compose paths to address nested families.
template inject_leaf source · line 133 · raw
@-E:Data -> @event:E -> E
Identity injection for a Data event in a leaf publication. Does not send it or establish a publication tick; runtime publication does that separately.
template inject_left source · line 137 · raw
@-E:Data -> @-A:Data -> @-B:Data -> @-inject:(@_:E -> A) -> @event:E -> 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>
Wrap one event on the left side of a heterogeneous publication with an empty right list. The closed inject callback embeds nested leaf shapes; this creates a Data publication value, without mutating any runtime stream.
template inject_right source · line 141 · raw
@-E:Data -> @-A:Data -> @-B:Data -> @-inject:(@_:E -> B) -> @event:E -> 0x7e321819d0ff210531780719c7674cef/event_publication.Publication<A, B>
Wrap one event on the right side of a heterogeneous publication with an empty left list. Retains the nested injection shape; does not publish or change a cursor until the runtime processes the resulting value.