def keep.read
import ezx@1.11.0.0/src/ws/relock.bend as Relockimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ws/workspace.bend as W
113# once it is known whether the root's ledger, `old`, had a `[workspace]`
114# table
115def keep.read(rd: W.Read, +old: String, +text: String) -> String:
116 match rd:
117 case W.Root{+spec}:
118 keep.parsed(M.parse(text), spec, W.root.of(old), text)
119 case W.Lone{}:
120 text
121 case W.Bad{_why}:
122 text