Run.answer: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/doctor/run.bend as Run Lines 60-80 of ezx@1.11.0.0/src/doctor/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/doctor/run.bend&start_line=60&end_line=80 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/io/file.bend as F import ezx@1.11.0.0/src/lock/run.bend as Run import ezx@1.11.0.0/src/lock/world.bend as W import ezx@1.11.0.0/src/doctor/world.bend as DW # one question, answered. `lib` is the library directory the planner names. def answer(+lib: String, ask: DW.Ask) -> IO(DW.Answer): match ask: case DW.Probe{+name}: do IO: +out : String <- probe.ask(String.eq(name, "bend"), name) return DW.Printed{R.ok(out), R.text(out)} case DW.Lib{dir}: do IO: +out : String <- R.exec(["ls", dir]) return DW.Printed{R.ok(out), R.text(out)} case DW.Sources{}: do IO: l : W.Listing <- Run.read.listing() return DW.Listed{l} case DW.Tree{a}: tree(lib ++ "/" ++ W.ask.hash(a)) case DW.Name{nv}: do IO: m : Maybe<&2, String> <- F.read(lib ++ "/names/" ++ nv) return DW.Held{m} Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/doctor/run.bend&name=probe.ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/doctor/run.bend&name=tree https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/doctor/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/doctor/world.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/io/file.bend&name=read https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=read.listing https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/world.bend&name=Listing https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/world.bend&name=ask.hash https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=ok https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=text