def names.sects

ezx@1.11.0.0 · src/lock/lock.bend:604

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

604# the `[names]` table: every name the lock resolved, in name order and each
605# once, sorted and deduplicated the way a package's files are. A lock that
606# resolved no name has no such table, so a project with no named import
607# locks to the text it always did.
608def names.sects(ns: List<&2, Name>) -> List<&2, T.Sect>:
609  match ns:
610    case []:
611      []
612    case +h <> +t:
613      [T.Sect{"names", file.pairs(K.files_of(name.files(h <> t)))}]

Uses (6)

Used by (1)