def packs.ok

ezx@1.11.0.0 · src/lock/plan.bend:390

import ezx@1.11.0.0/src/lock/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/lock.bend as L

390# whether every package can be written, and no hash is written twice
391def packs.ok(ps: List<&2, L.Pack>) -> Bool:
392  match ps:
393    case []:
394      True{}
395    case +h <> +t:
396      +rest = packs.ok(t)
397      Bool.and(Bool.and(paths.ok(L.pack.files(h)),
398        Bool.and(clean.all(pack.values(h)), Bool.not(L.has(t, L.pack.hash(h))))),
399        rest)

Uses (11)

Used by (1)