def unfit

ezx@1.11.0.0 · src/fetch/plan.bend:224

import ezx@1.11.0.0/src/fetch/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/pkg/pkg.bend as K

224# the first path that does not fit, "" when every file does
225def unfit(fs: List<&2, K.Item>, ls: List<&2, W.Source>) -> String:
226  match fs ls:
227    case Nil{} Nil{}:
228      ""
229    case Nil{} Con{l, _m}:
230      W.Source{at, _text} = l
231      at
232    case Con{f, _g} Nil{}:
233      K.file.at(f)
234    case Con{+f, g} Con{l, m}:
235      unfit.pick(fit(f, l), K.file.at(f), unfit(g, m))

Uses (7)

Used by (1)