def hash.put
import ezx@1.11.0.0/src/lock/lock.bend as Lockimport 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
670# every hash a lock records, one per `[packages."<hash>".files]` table
671def hash.put(hit: Bool, sect: T.Sect, rest: List<&2, String>) -> List<&2, String>:
672 match hit:
673 case True{}:
674 T.Sect{n, _ps} = sect
675 K.word(T.segments(n), 1n) <> rest
676 case False{}:
677 rest