def register
import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScopeimport Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Rel
import bendvy-ecs-core@0.1.0.4/ordinary_app_linked_cleanup_system.bend as LCS
import bendvy-ecs-core@0.1.0.4/ordinary_component_clear_declaration.bend as Clear
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
120# Register a scope system with access derived from the component-clear
121# certificate, relation declarations and LifetimeScope:write. Returns the ordinary
122# Registry registration result with the returned World on success or refusal.
123# Registration runs no body and applies no spawn/cleanup. Supply the matching
124# trusted populate/clear routes, then retain the actual returned Registry for run.
125def register(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~populate:W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>> -> W.Handle<S> -> P -> W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,~declarations:List<&2,Rel.Declaration<S>>,~Args:Type,~Error:Data,~Out:Type,~body:@-H:Type -> @-ops:Ops<H,S,P> -> Args -> H -> H & (T.Outcome<Error> & Out),~clearDeclaration:Clear.Declaration<S,C,A.Notice<S,E>,clear>,world:W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,name:String) -> Sys.RegistrationResult<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>,Args,Error,Out,runner(~S,~C,~R,~E,~P,~populate,~clear,~record,~declarations,~Args,~Error,~Out,~body)>:
126 Sys.register(~S,~A.Store<S,Sc.Store<S,C>>,~R,~A.Notice<S,E>,~Args,~Error,~Out,~runner(~S,~C,~R,~E,~P,~populate,~clear,~record,~declarations,~Args,~Error,~Out,~body),world,name,List.append(&2,String,LCS.writes(Clear.keys(~S,~C,~A.Notice<S,E>,~clear,clearDeclaration)),List.append(&2,String,LCS.relation_accesses(~S,declarations),["LifetimeScope:write"])))
Uses (19)
Used by (0)
No other definition uses this definition.