def code
import bolt@1.27.0.0/src/role.bend as Roleimport Base
import bolt@1.27.0.0/src/rules/imports.bend as Imports
139# the roots of the code: every package's main.bend, and every file the laws
140# do not reach
141def code(fs: List<&2, Fact>, +laws: List<&2, String>) -> List<&2, String>:
142 match fs:
143 case Nil{}:
144 Nil{}
145 case Con{Fact{+norm, _deps, _named, entry}, rest}:
146 +more = code(rest, laws)
147 Bool.pick(List<&2, String>, Bool.or(entry, Bool.not(Imports.has(laws, norm))), norm <> more, more)