def hub.had
import ezx@1.11.0.0/src/ez/named.bend as Namedimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
211# the name the ledger already gives a hub package of this name part, first in
212# document order, or "" when it gives none. Adding another version of a name
213# is then the same entry, as re-adding a git dependency at a new tag is.
214def hub.had(ds: List<&2, M.Dep>, +part: String) -> String:
215 match ds:
216 case []:
217 ""
218 case h <> t:
219 M.Dep{n, _h, _e, s} = h
220 had.at(hub.from(s, part), n, hub.had(t, part))