def provision

bendvy-ecs-core@0.1.0.4 · ordinary_lifetime_scope.bend:41

import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScope
import 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/ordinary_schema_provision.bend as Provision
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A

41# Lift the matching schema provision with its empty/count adapters.
42# The component/resource entries remain unchanged while the Store gains scope
43# membership and relation state. Pass the result to ordinary-lifetime-scope-io.create.
44# Concrete setup: test-fixtures/public-scopes/feature-timing-v1/fixture.bend:
45# provision, create and scoped_binding; main.bend exercises deferred cleanup.
46def provision(~S:Data,~C:Type,~R:Type,~empty:Unit -> C,~count:C -> List<&2,W.Handle<S>> -> C & List<&2,Maybe<&2,U32>>,value:Provision.Provision<S,C,R,empty,count>) -> Provision.Provision<S,A.Store<S,Sc.Store<S,C>>,R,empty_store(~S,~C,~empty),count_store(~S,~C,~count)>:
47  match value:
48    case Provision.Provision{value}:Provision.Provision{schema(~S,~C,~R,value)}

Uses (12)

Used by (0)

No other definition uses this definition.