~/bend-docscommunity

ordinary_recovery_component.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/ordinary_recovery_component.bend as Ordinary_recovery_component

14 imports
import Base
import ./recovery_use.bend as Use
import ./world.bend as W
import ./column.bend as Col
import ./owner_product.bend as Product
import ./ordinary_component_binding.bend as B
import ./ordinary_declaration.bend as Identity
import ./ordinary_recovery_declaration.bend as D
import ./ordinary_recoverable_array_resource.bend as F
import ./ordinary_recoverable_component_capture.bend as Existing
import ./recoverable_component.bend as RC
import ./recoverable_component_family.bend as Family
import ./recoverable_owner.bend as RO
import ./recovery_journal.bend as Journal

Templates

template Ops source · line 19 · raw

@-S:Data -> @-P:Type -> @-identity:0x67fd5084c1da4adc13317822045bb11f/ordinary_declaration.Declaration<S, P> -> @H:Type -> Type

Existing schema take/put/view are trusted provisioning, never gameplay inverses. Nominal recoverable component replacement capability family. P may be affine Type; the grant is bound to its ordinary component identity, not a printable access name or a caller-provided inverse.

template empty source · line 20 · raw

@-S:Data -> @-P:Type -> @unit:Unit -> List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>

template released source · line 21 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> @-All:Type -> @-ReleasedRest:Type -> @-path:0x67fd5084c1da4adc13317822045bb11f/owner_product.Lens<All, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, ReleasedRest> -> @capture:Capture -> @recovery:All -> @result:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>) -> Pair(0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All)

template inverse source · line 24 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> @-All:Type -> @-ReleasedRest:Type -> @-path:0x67fd5084c1da4adc13317822045bb11f/owner_product.Lens<All, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, ReleasedRest> -> @old:0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P> -> @success:Bool -> @state:0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture> -> @recovery:All -> Pair(0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All)

template replaced source · line 28 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> @-All:Type -> @-ReleasedRest:Type -> @-path:0x67fd5084c1da4adc13317822045bb11f/owner_product.Lens<All, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, ReleasedRest> -> @capture:Capture -> @journal:List<&1, 0x67fd5084c1da4adc13317822045bb11f/recovery_journal.Action(0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All)> -> @result:0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Replacement<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, S, P> -> 0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_component_capture.ComponentAttempt<0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_array_resource.Frame<0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All>, P>

template replace source · line 37 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> @-All:Type -> @-ReleasedRest:Type -> @-path:0x67fd5084c1da4adc13317822045bb11f/owner_product.Lens<All, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, ReleasedRest> -> @frame:0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_array_resource.Frame<0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All> -> @handle:0x67fd5084c1da4adc13317822045bb11f/world.Handle<S> -> @incoming:Maybe<&1, P> -> 0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_component_capture.ComponentAttempt<0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_array_resource.Frame<0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All>, P>

Replace an optional component owner through the canonical binding. Immediate refusal returns frame, incoming owner and error without adding an inverse. Accepted records the displaced component receipt; commit returns displaced owners, while rollback restores recorded state and recovers replacements. Other World/capture owners are retained through the frame.

template grant source · line 43 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> @-All:Type -> @-ReleasedRest:Type -> @-path:0x67fd5084c1da4adc13317822045bb11f/owner_product.Lens<All, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, ReleasedRest> -> @unit:Unit -> 0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_component_capture.ComponentWrite<S, P, 0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.identity(S, C, Rest, P, V, Token, take, put, view, binding), 0x67fd5084c1da4adc13317822045bb11f/ordinary_recoverable_array_resource.Frame<0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, All>>

Advanced canonical grant builder specialized at the complete recovery product/path. Raw erased lenses must match the declaration; gameplay receives the resulting nominal component operation, not journal callbacks.

template declaration source · line 48 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Capture:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0x67fd5084c1da4adc13317822045bb11f/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @-binding:0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> 0x67fd5084c1da4adc13317822045bb11f/ordinary_recovery_declaration.Declaration<S, 0x67fd5084c1da4adc13317822045bb11f/owner_product.Owner<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Capture>, List<&1, 0x67fd5084c1da4adc13317822045bb11f/recoverable_component.Record<S, P>>, Ops(S, P, 0x67fd5084c1da4adc13317822045bb11f/ordinary_component_binding.identity(S, C, Rest, P, V, Token, take, put, view, binding)), grant(S, C, R, E, Capture, Rest, P, V, Token, take, put, view, binding)>

Build a complete typed component-recovery declaration from its ordinary binding. Derives access/use metadata and the canonical recovery accumulator without executing an operation. Compose with other leaves using ordinary-recovery-declaration.both; semantics: docs/parity/recovery.md.