def initialize_removal
import bendvy-ecs-core@0.1.0.4/ordinary_reader_stream_parameter.bend as OrdinaryReaderStreamParameterimport Base
import bendvy-ecs-core@0.1.0.4/reader_parameter.bend as RP
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/event_family_routing.bend as Route
import bendvy-ecs-core@0.1.0.4/event_notice_runtime.bend as Mixed
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as Notice
import bendvy-ecs-core@0.1.0.4/ordinary_removal_provision.bend as Provision
import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity
import bendvy-ecs-core@0.1.0.4/removals.bend as Rm
540def initialize_removal(~S:Data,~C:Type,~R:Type,~P:Data,~Payload:Type,~F:Type,~H:Type,
541 ~inject:Identity.Declaration<S,Payload> -> W.Handle<S> -> Notice.Notice<S,P>,
542 ~select:Notice.Notice<S,P> -> Maybe<&2,Rm.Record<S,Identity.Declaration<S,Payload>>>,
543 ~selection:Provision.Selection<S,Payload,Notice.Notice<S,P>,inject,select>,
544 context:Route.Runtime<S,C,R,Notice.Notice<S,P>,Mixed.State<S,P,F,H>>,
545 facts:RP.RegistrationFacts) -> Route.Runtime<S,C,R,Notice.Notice<S,P>,Mixed.State<S,P,F,H>> & (RemovalOwner<S,Payload,Notice.Notice<S,P>,select> & RP.Param<Route.Runtime<S,C,R,Notice.Notice<S,P>,Mixed.State<S,P,F,H>>,RemovalOwner<S,Payload,Notice.Notice<S,P>,select>,RemovalView<S,Payload>,Nat,
546 validate_removal(~S,~C,~R,~P,~Payload,~F,~H,~inject,~select,~selection),prepare_removal(~S,~C,~R,~P,~Payload,~F,~H,~select),commit_removal(~S,~C,~R,~P,~Payload,~F,~H,~select),release_removal(~S,~C,~R,~P,~Payload,~F,~H,~select)>):
547 match facts:
548 case RP.RegistrationFacts{+namespace,+id,_,_}:
549 (context,
550 (RemovalOwner{facts,Rm.Reader{namespace,id,Identity.key(~S,~Payload,removal_identity(~S,~Payload,~Notice.Notice<S,P>,~inject,~select,selection)),0n}},
551 removal_param(~S,~C,~R,~P,~Payload,~F,~H,~inject,~select,~selection)))
Uses (23)
Used by (0)
No other definition uses this definition.