1 # remove/run: the interpreter for `ez remove`. It reads ez.toml and 2 # `.gitignore` into a World, asks the planner (remove/plan.bend) for the plan, 3 # and runs it with the lock's effect runner (`Run.exec.plan`), which exits 1 4 # with the reason when the plan refuses. It decides nothing; that it reads and 5 # executes faithfully is EZ-TRUST-2. 6 import Base 7 import ../io/file.bend as F 8 import ../lock/run.bend as Run 9 import ./plan.bend as RP 10 11 # `ez remove ` 12 def run(+name: String) -> IO(Unit): 13 do IO: 14 lib : String <- Run.bend.lib() 15 led : Maybe<&2, String> <- F.read(RP.toml()) 16 ig : Maybe<&2, String> <- F.read(RP.ignore.file()) 17 Run.exec.plan(lib, RP.plan(RP.World{name, led, F.text_of(ig)}))