def good
import ezx@1.11.0.0/src/fetch/plan.bend as Planimport Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/pkg/pkg.bend as K
207# whether a package may be laid: every file is the one the lock names, no
208# path leaves the tree, and the files hash to the name the lock records them
209# under, so the tree laid under that name is that name's
210def good(fs: List<&2, K.Item>, +hash: String, +ls: List<&2, W.Source>) -> Bool:
211 +fit = fits(fs, ls)
212 +safe = paths.safe(ls)
213 Bool.and(fit, Bool.and(safe, String.eq(hash, named(ls))))