Lock.pack.block: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/lock/lock.bend as Lock Lines 520-528 of ezx@1.11.0.0/src/lock/lock.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/lock/lock.bend&start_line=520&end_line=528 import Base import ezx@1.11.0.0/src/toml/toml.bend as T import ezx@1.11.0.0/src/pkg/pkg.bend as K # a package's two tables as one block of text, filed under its hash. The lock # puts packages in hash order by sorting these blocks with `K.file.sort`, # whose order-independence pkg proves; a second sort over packages would need # that proof again, and Bend's function values are linear, so one sort by a # key function applied at every comparison cannot be written. A block's path # is its package's hash, so distinct hashes are distinct paths. def pack.block(package: Pack) -> K.Item: Pack{+hash, src, files} = package K.Item{hash, T.render(pack.sects.of(hash, src, K.files_of(files)))} Uses (5): https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/lock.bend&name=Pack https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/lock.bend&name=pack.sects.of https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=Item https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=files_of https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/toml/toml.bend&name=render