def lay.named

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

import ezx@1.11.0.0/src/lock/plan.bend as Plan
import 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

1081# whether a laid tree is named by the manifest of the texts it lays: its
1082# last file is the manifest of the others, each weighed by its own text,
1083# and its hash is the `0x` name of that manifest
1084def lay.named(+hash: String, +fs: List<&2, W.Source>) -> Bool:
1085  +sums = K.files_of(W.weighs(front(fs)))
1086  Bool.and(String.eq(hash, K.hash_of(sums)), String.eq(last(fs), K.manifest_of(sums)))

Uses (12)

Used by (1)