def has

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

import ezx@1.11.0.0/src/lock/lock.bend as Lock
import Base

401# whether a package is already resolved. The wanted hash is compared first,
402# the way pkg's `fresh` compares a path, so a walk that passes over a hash it
403# has is a walk whose hashes are distinct without a symmetry lemma.
404def has(ds: List<&2, Pack>, +wanted: String) -> Bool:
405  match ds:
406    case []:
407      False{}
408    case x <> t:
409      any.step(String.eq(wanted, pack.hash(x)), _u => has(t, wanted))

Uses (7)

Used by (2)