def tree.read
import ezx@1.11.0.0/src/fetch/plan.bend as Planimport Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/lock/lock.bend as L
90# a manifest and the texts of the files it names, as a tree: what is under
91# BEND_LIB, or what the hub served
92def tree.read(answer: W.Answer) -> Tree:
93 match answer:
94 case W.Got{_how, manifest, ss}:
95 Tree{"", zip(L.manifest.files(String.lines(manifest)), ss)}
96 case W.Miss{why}:
97 Gone{why}
98 case _:
99 Gone{"ez: a tree was not answered with one"}