def led.read
import ezx@1.11.0.0/src/pub/plan.bend as Planimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
266# the entry a parsed ledger names, `main.bend` when it names none, and the
267# name its `publish-as` and `version` give it
268def led.read(ledger: M.Read) -> Led:
269 match ledger:
270 case M.Bad{why}:
271 LedNo{"ez: " ++ M.show(M.Bad{why})}
272 case M.Good{m}:
273 M.Manifest{_n, +e, _b, _h, +pa, +pv, _ds, _ts} = m
274 led.named(Bool.pick(String, String.is_empty(e), "main.bend", e), naming(pa, pv))