~/bend-docscommunity

bundle_canonical_construction.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/bundle_canonical_construction.bend as Bundle_canonical_construction

6 imports
import Base
import decode_construction.bend as Constructor
import ordinary_declaration.bend as Identity
import decode_data.bend as D
import bundle_construction.bend as Build
import bundle_pack.bend as Pack

Templates

template restored source · line 13 · raw

@-Ctx:Type -> @-Factory:Type -> @-Rest:Type -> @-I:Type -> @-P:Type -> @-Error:Data -> @-restore:(@_:Factory -> @_:Rest -> Ctx) -> @rest:Rest -> @observed:Pair(Factory, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Error>) -> Pair(Ctx, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Error>)

An ordinary schema context owns its constructor factories and other owners. Both factory and rest return through the authored lenses; neither is copied. Canonical decode-construction.request/fallible_request satisfy this request shape. Error remains the caller's selected Data type, including their distinct validation/constructor errors. This introduces no default retry or inverse.

template projected source · line 16 · raw

@-Ctx:Type -> @-Factory:Type -> @-Rest:Type -> @-I:Type -> @-P:Type -> @-Error:Data -> @-restore:(@_:Factory -> @_:Rest -> Ctx) -> @-request:(@_:Factory -> @_:I -> Pair(Factory, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Error>)) -> @input:I -> @observed:Pair(Factory, Rest) -> Pair(Ctx, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Error>)

template stage source · line 23 · raw

@-Ctx:Type -> @-Factory:Type -> @-Rest:Type -> @-I:Type -> @-P:Type -> @-TR:Type -> @-TC:Type -> @-Error:Data -> @-project:(@_:Ctx -> Pair(Factory, Rest)) -> @-restore:(@_:Factory -> @_:Rest -> Ctx) -> @-request:(@_:Factory -> @_:I -> Pair(Factory, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Error>)) -> @-tail:(@_:Ctx -> @_:TR -> 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Staged<Ctx, TR, TC, Error>) -> @ctx:Ctx -> @input:0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<I, TR> -> 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Staged<Ctx, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<I, TR>, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<P, TC>, Error>

Tail is arbitrary Type. The caller recursively supplies another stage or the existing terminal; this is not an unrolled family-count-specific bundle API.

template canonical_stage source · line 28 · raw

@-S:Data -> @-Ctx:Type -> @-Rest:Type -> @-I:Type -> @-P:Type -> @-TR:Type -> @-TC:Type -> @-Custom:Data -> @-identity:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_declaration.Declaration<S, P> -> @-project:(@_:P -> Pair(P, 0x14a72e1c180a5ab1f8a056d43822425c/decode_data.Raw)) -> @-incoming:(@_:I -> Pair(I, 0x14a72e1c180a5ab1f8a056d43822425c/decode_data.Raw)) -> @-build:(@_:I -> @_:0x14a72e1c180a5ab1f8a056d43822425c/decode_data.Raw -> 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Construction<I, P, Custom>) -> @-take:(@_:Ctx -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/decode_construction.FallibleFactory<S, I, P, Custom, identity, project, incoming, build>, Rest)) -> @-put:(@_:0x14a72e1c180a5ab1f8a056d43822425c/decode_construction.FallibleFactory<S, I, P, Custom, identity, project, incoming, build> -> @_:Rest -> Ctx) -> @-tail:(@_:Ctx -> @_:TR -> 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Staged<Ctx, TR, TC, 0x14a72e1c180a5ab1f8a056d43822425c/decode_construction.Error<Custom>>) -> @ctx:Ctx -> @input:0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<I, TR> -> 0x14a72e1c180a5ab1f8a056d43822425c/bundle_construction.Staged<Ctx, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<I, TR>, 0x14a72e1c180a5ab1f8a056d43822425c/bundle_pack.Pack<P, TC>, 0x14a72e1c180a5ab1f8a056d43822425c/decode_construction.Error<Custom>>

Actual canonical factory request, with retained runtime input codec and nominal declaration. Custom constructor errors remain distinct from validation errors.