def define_inspected

bendvy-ecs-core@0.1.0.3 · execution_generalized_command_leaf.bend:30

import bendvy-ecs-core@0.1.0.3/execution_generalized_command_leaf.bend as ExecutionGeneralizedCommandLeaf
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as L
import bendvy-ecs-core@0.1.0.3/execution_command_system.bend as Cmd
import bendvy-ecs-core@0.1.0.3/execution_command_local.bend as Local
import bendvy-ecs-core@0.1.0.3/execution_command_removed.bend as Removed
import bendvy-ecs-core@0.1.0.3/execution_system.bend as Sys
import bendvy-ecs-core@0.1.0.3/execution_system_registration.bend as Registration
import bendvy-ecs-core@0.1.0.3/world.bend as W

30def define_inspected(~S:Data,~components:L.Layout,~resources:L.Layout,~E:Data,~route:L.Route,~Ops:Data -> (Type -> Type) -> Type -> Type -> Type,~User:Type,~Error:Data,~Out:Data,~declaration:Cmd.Program(~S,~L.columns(~S,components),~L.resources(~S,resources),~components,~resources,~route,~Ops),~body:Cmd.Body(~S,~components,~resources,~route,~Ops,~User,~Error,~Out),world:W.World<S,L.columns(~S,components),L.resources(~S,resources),E>,name:String,user:User,observed:Compilation(~S,~components,~resources,~route,~Ops) & Cmd.CheckedPermission<S,resources>) -> Compilation(~S,~components,~resources,~route,~Ops) & Sys.Defined<W.World<S,L.columns(~S,components),L.resources(~S,resources),E>,Owner(~S,~components,~resources,~E,~route,~Ops,~User,~Error,~Out,~declaration,~body),Cmd.Captures(~S,~components,~resources,~route,~User)>:
31  match observed:
32    case (compilation,Cmd.UnsupportedPermission{permission,_}):(compilation,Sys.DefinitionRefused{world,Local.fresh(~S,~L.payload(components,route),~Removed.Removed(components),~User,user,permission)})
33    case (compilation,Cmd.ReadyPermission{permission,_}):defined(~S,~components,~resources,~E,~route,~Ops,~User,~Error,~Out,~declaration,~body,Registration.define_with_compilation(~S,~L.columns(~S,components),~L.columns(~S,components),~L.resources(~S,resources),~E,~Cmd.ScopedOps(~S,~components,~resources,~route,~Ops),~Cmd.Captures(~S,~components,~resources,~route,~User),~Error,~Out,~Cmd.program_for_buffer(~S,~L.columns(~S,components),~L.resources(~S,resources),~components,~resources,~route,~Ops,~declaration),~Cmd.runner(~S,~components,~resources,~route,~Ops,~User,~Error,~Out,~body),~L.resources(~S,resources),compilation,world,name,Local.fresh(~S,~L.payload(components,route),~Removed.Removed(components),~User,user,permission)))

Uses (23)

Used by (1)