def ok

ezx@1.11.0.0 · src/ws/workspace.bend:364

import ezx@1.11.0.0/src/ws/workspace.bend as Workspace
import Base

364# whether the workspace has a member set: every entry names a directory a
365# workspace can name, every one naming a directory as it is names one with a
366# committed ez.toml, no member is a workspace root of its own, and no two
367# members have one package name
368def ok(+spec: Spec, +root: Root, +ls: List<&2, Ledger>) -> Bool:
369  Spec{es, _ex} = spec
370  Bool.and(entries.ok(es),
371    Bool.and(present(es, dirs.of(ls)),
372      Bool.and(unnested(picks(spec, ls)), distinct(names(root, picks(spec, ls))))))

Uses (13)

Used by (1)