def run.go
import ezx@1.11.0.0/src/ez/cmd.bend as Cmdimport Base
import ezx@1.11.0.0/src/lock/run.bend as Run
import ezx@1.11.0.0/src/share/env.bend as Env
import ezx@1.11.0.0/src/ez/start.bend as S
120# a run, and how it ends: exit 1 with the reason for a refusal, and the
121# program's own status otherwise (`S.code`, EZ-OUT-1)
122def run.go(+start: S.Start) -> IO(Unit):
123 do IO<Unit>:
124 at : String <- Env.lib()
125 +program : U32 <- run.started(start, at)
126 +code : U32 <- IO.pure(U32, S.code(start, program))
127 Run.end.at(U32.is_eq(code, 0), code, S.why(start))