def checked
bendvy-ecs-core@0.1.0.4 · hierarchy_provider.bend:36
import bendvy-ecs-core@0.1.0.4/hierarchy_provider.bend as HierarchyProvider
import Base
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_reorder.bend as Reorder
import bendvy-ecs-core@0.1.0.4/world.bend as W
36def checked(~S:Data,~C:Type,~R:Type,~E:Data,~descriptor:G.HierarchyDescriptor<S>,observed:W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & Bool,target:W.Handle<S>) -> W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & Maybe<&2,Frame<S>>:
37 match observed:
38 case (world,False{}): (world,None{})
39 case (world,True{}): present(~S,~C,~R,~E,W.with_store(~S,~A.Store<S,C>,~R,~A.Notice<S,E>,~Frame<S>,store => store_snapshot(~S,~C,store,Reorder.descriptor(~S,descriptor),target),world))