def names.why

ezx@1.11.0.0 · src/lock/plan.bend:571

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

571# why the names a lock needs stop it, or "" when they do not: a name the hub
572# rules out, as bend refuses it; a name the project imports that ez.toml does
573# not record, which is the lock's own rule, since only a dependency ez.toml
574# records vouches for where a name came from; and a name nothing resolved
575def names.why(
576  +lns: List<&2, L.Name>,
577  +ns: List<&2, L.Name>,
578  +js: List<&2, W.Judged>,
579  +roots: List<&2, String>,
580  +need: List<&2, String>
581) -> String:
582  +bad = names.ruled(need)
583  why.then(why.missing(bad, _u => K.unnamed.why(bad)), _v =>
584    why.then(why.missing(names.missing(lns, roots), _w =>
585        names.unledgered.why(names.missing(lns, roots))), _x =>
586      why.missing(names.missing(ns, need), _y =>
587        names.open.why(look(js, names.missing(ns, need)), names.missing(ns, need)))))

Uses (12)

Used by (1)