~/bend-docscommunity

src/remove/run.bend relies on unsafe/foreign

raw source on the hub · import ezx@1.15.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.4.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 more source · line 21 · raw

@world:0x54c6454e798d1d497bdd6d0af3a8ac92/src/remove/relock.World -> @rs:List<&2, 0x54c6454e798d1d497bdd6d0af3a8ac92/src/lock/world.Reply> -> 0x54c6454e798d1d497bdd6d0af3a8ac92/src/remove/relock.World

the World with more of the lock's answers in it

def loop.step source · line 27 · raw

@st:0x54c6454e798d1d497bdd6d0af3a8ac92/src/remove/relock.Next -> @+lib:String -> @world:0x54c6454e798d1d497bdd6d0af3a8ac92/src/remove/relock.World -> @go:(@_:0x54c6454e798d1d497bdd6d0af3a8ac92/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 38 · raw

@fuel:Nat -> @+lib:String -> @+ws:0x54c6454e798d1d497bdd6d0af3a8ac92/src/ws/relock.Ws -> @+world:0x54c6454e798d1d497bdd6d0af3a8ac92/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>