def read.of

ezx@1.11.0.0 · src/add/world.bend:109

import ezx@1.11.0.0/src/add/world.bend as World
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

109# the ledger as read: what the file says, or, with no file, a read that did
110# not parse and says why. A missing ledger is not an empty one to write back.
111def read.of(got: Maybe<&2, String>) -> M.Read:
112  match got:
113    case None{}:
114      M.Bad{"no " ++ toml() ++ " here; ez add works on a project's " ++
115        "ledger, and ez init makes one"}
116    case Some{text}:
117      M.parse(text)

Uses (6)

Used by (1)