Server.pub.answer: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/server.bend as Server Lines 321-332 of bolt@1.27.0.0/src/lsp/server.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/server.bend&start_line=321&end_line=332 import Base import bolt@1.27.0.0/src/lint/world.bend as W import bolt@1.27.0.0/src/lsp/files/service.bend as F # one question of the planner's, answered from the files: a directory's # entries, or a file's text (a directory reads as no text) def pub.answer(~fs: F.Files, ask: W.Ask) -> IO(W.Answer): match ask: case W.Entries{dir}: do IO: es : List<&2, String> <- F.entries(fs, dir) return W.Listed{es} case W.Contents{path}: do IO: mm : Maybe<&2, String> <- F.read(fs, path) return pub.read.answer(mm) Uses (12): 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=bolt@1.27.0.0/src/lint/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lint/world.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/files/service.bend&name=Files https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/files/service.bend&name=entries https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/files/service.bend&name=read https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/server.bend&name=pub.read.answer