def made.anc
import ezx@1.11.0.0/src/pkg/pkg.bend as Pkgimport Base
import ezx@1.11.0.0/src/pkg/path.bend as P
1213# a package that climbs re-roots under as many of the entry directory's
1214# trailing components as its deepest climb. The walk refuses an import that
1215# climbs out of the checkout, so there are always that many; a package that
1216# still climbs further is refused rather than named after nothing.
1217def made.anc(far: Bool, +levels: Nat, +dir: String, +out: List<&2, Hit>) -> Walked:
1218 match far:
1219 case True{}:
1220 Refused{"ez: the package climbs out of the checkout"}
1221 case False{}:
1222 made.checked(P.climb(levels, dir), P.tail(dir, levels), out)