def foreign.check
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
858# the first foreign body of a file that stops the walk, or `Going` when none
859# does
860def foreign.check(+tree: Tree, +dir: String, +nd: String, ats: List<&2, String>) -> Stop:
861 match ats:
862 case []:
863 Going{}
864 case +h <> t:
865 +at = P.join(dir, h)
866 foreign.judge(outside(at), tree, at, P.join(nd, h),
867 _u => foreign.check(tree, dir, nd, t))