src/remove/run.bend relies on unsafe/foreign
raw source on the hub · import ezx@1.18.0.0/src/remove/run.bend as Run
remove/run: the interpreter for ez remove. It reads the directory it runs
in, ez.toml, .gitignore and the .bend files git lists into a World, then
loops: it asks the planner (remove/relock.bend) what the lock after the
remove still needs, answers each question with the lock's interpreter
(Run.answer.all), and adds the answers to the World, until nothing is
left to ask. Then it runs the plan with the lock's effect runner
(Run.exec.plan), which exits 1 with the reason when the plan refuses. It
decides nothing; that it reads and executes faithfully is trusted in
ez/app.bend.
9 imports
import Base import snap@1.6.0.0/main.bend as R import ../io/file.bend as F import ../lock/run.bend as Run import ../lock/world.bend as W import ./plan.bend as RP import ./relock.bend as RR import ../ws/relock.bend as Rel import ../ws/run.bend as WsRun
Definitions
def loop.step source · line 22 · raw
@st:0x2414c9622cab2353684d02a392804eb1/src/remove/relock.Next -> @+lib:String -> @world:0x2414c9622cab2353684d02a392804eb1/src/remove/relock.World -> @go:(@_:0x2414c9622cab2353684d02a392804eb1/src/remove/relock.World -> IO(Unit)) -> IO(Unit)
the planner's step: its questions answered and the loop gone round again, or its plan run
def loop source · line 33 · raw
@fuel:Nat -> @+lib:String -> @+ws:0x2414c9622cab2353684d02a392804eb1/src/ws/relock.Ws -> @+world:0x2414c9622cab2353684d02a392804eb1/src/remove/relock.World -> IO(Unit)
the loop, under fuel. Every round adds an answer, since the lock never asks
what the World answers already, so the fuel (Run.rounds) is only a guard.
def run source · line 46 · raw
@+name:String -> IO(Unit)
ez remove <name>