def hub.from
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
200# whether a source is a hub package added by a name with this name part,
201# whatever its version
202def hub.from(src: M.Source, +part: String) -> Bool:
203 match src:
204 case M.Hub{named}:
205 String.eq(hub.part(named), part)
206 case M.Git{_u, _rev, _tag, _root, _nar, _vend}:
207 False{}
208 case M.Member{_path, _named}:
209 False{}