def run
import bendvy-ecs-core@0.1.0.3/inspector.bend as Inspectorimport Base
import world.bend as W
114# Run a standalone read-only Inspector body with its own Instance cursor.
115# Returns World and Instance on both body success and failure. Success advances
116# World clock and observation cursor; failure retains the prior cursor. Neither
117# path advances a registered system cursor or owns event retention. This raw
118# Instance has no world namespace check; canonical runtime-bound wrappers
119# enforce their separate registration/world contracts. Trusted projections
120# must preserve owners; arbitrary host effects are not automatically rolled back.
121# Inspection contract and consumers: docs/parity/inspect.md.
122def run(~S:Data,~Store:Type,~R:Type,~E:Data,~Ops:Type -> Type,~A:Data,~U:Data,~Out:Data,~plan:Plan<S,Store,R,E,Ops>,~body:@-H:Type -> @-caps:Ops(H) -> A -> H -> H & Result<&2,&2,U,Out>,instance:Instance<S>,args:A,world:W.World<S,Store,R,E>) -> Observed<S,Store,R,E,U,Out>:
123 match instance:
124 case Fresh{}:first(~S,~Store,~R,~E,~Ops,~A,~U,~Out,~plan,~body,args,W.clock(~S,~Store,~R,~E,world))
125 case Active{cursor,registeredAt}:initialized(~S,~Store,~R,~E,~Ops,~A,~U,~Out,~plan,~body,args,cursor,registeredAt,world)
Uses (9)
Used by (0)
No other definition uses this definition.