def define

bendvy-ecs-core@0.1.0.4 · ordinary_recovery_system.bend:55

import bendvy-ecs-core@0.1.0.4/ordinary_recovery_system.bend as OrdinaryRecoverySystem
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/ordinary_recovery_declaration.bend as D

55# Register a recoverable body with access derived from its declaration.
56# Consumes capture on success; definition refusal returns it with World.
57# No body or inverse operation runs at registration.
58# Contract and consumers: docs/parity/recovery.md.
59def define(~S:Data,~C:Type,~R:Type,~E:Data,~Capture:Type,~Recovery:Type,~Ops:Type -> Type,~Args:Type,~Error:Data,~Out:Type,~builder:D.Builder(~Product.Owner<W.World<S,C,R,E>,Capture>,~Recovery,~Ops),~declaration:D.Declaration<S,Product.Owner<W.World<S,C,R,E>,Capture>,Recovery,Ops,builder>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome<Error> & Out),world:W.World<S,C,R,E>,name:String,capture:Capture) -> Defined<W.World<S,C,R,E>,Owner<Sys.Registry<S,C,R,E,Request<Args,Capture>,Unit,Reply<Capture,Recovery,Error,Out>,runner(~S,~C,~R,~E,~Capture,~Recovery,~Ops,~Args,~Error,~Out,~builder,~declaration,~body)>,Capture>,Capture>:
60  registered(~S,~C,~R,~E,~Capture,~Recovery,~Ops,~Args,~Error,~Out,~builder,~declaration,~body,capture,Sys.register(~S,~C,~R,~E,~Request<Args,Capture>,~Unit,~Reply<Capture,Recovery,Error,Out>,~runner(~S,~C,~R,~E,~Capture,~Recovery,~Ops,~Args,~Error,~Out,~builder,~declaration,~body),world,name,D.access(~S,~Product.Owner<W.World<S,C,R,E>,Capture>,~Recovery,~Ops,~builder,declaration)))

Uses (17)

Used by (1)