def root.write
import ezx@1.11.0.0/src/ws/up.bend as Upimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/lock/plan.bend as LP
import ezx@1.11.0.0/src/ws/workspace.bend as W
197# the root's ledger, written back when the upgrade changed it
198def root.write(rd: M.Read, +spec: W.Spec, +root: W.Root, +joint: M.Manifest) -> List<&2, LP.Effect>:
199 match rd:
200 case M.Bad{_why}:
201 []
202 case M.Good{+mm}:
203 write.if(mm, joint, "ez.toml", root.text(ledger.back(mm, joint), spec, root))