def marks.key
import bolt@1.27.0.0/src/lint/plan.bend as Planimport Base
import bolt@1.27.0.0/src/role.bend as Role
import bolt@1.27.0.0/src/rules/imports.bend as Imports
400# each path's mark as the path is spelled: its role among marks taken over
401# resolved paths (abs), neither when it has none there
402def marks.key(ps: List<&2, String>, +cwd: String, +ms: List<&2, Role.Mark>) -> List<&2, Role.Mark>:
403 match ps:
404 case Nil{}:
405 Nil{}
406 case Con{+p, rest}:
407 Role.Mark{Imports.norm(p), Role.of.norm(ms, abs(cwd, p))} <> marks.key(rest, cwd, ms)