def ledger.of
import ezx@1.11.0.0/src/ws/workspace.bend as Workspaceimport Base
import ezx@1.11.0.0/src/toml/toml.bend as T
558# a committed ez.toml under the root, read: the directory it is in, which is
559# its path with the last segment cut, its `[package] name`, and whether it has
560# a `[workspace]` table. A path that is not an ez.toml under a directory is
561# none.
562def ledger.of(+path: String, +text: String) -> Maybe<&2, Ledger>:
563 +ss = T.sects(T.parse(text))
564 ledger.go(cut(segs.of(path), "ez.toml"), T.value(pairs.of(ss, "package"), "name"),
565 sect.has(ss, "workspace"))