def fresh.spec
import bolt@1.27.0.0/src/rules/imports.bend as Importsimport Base
86# the files of ds that were read and are not yet seen, each once: the spec
87# fresh.fast is proven against (imp.fresh)
88def fresh.spec(ds: List<&2, String>, +seen: List<&2, String>, +read: List<&2, String>) -> List<&2, String>:
89 match ds:
90 case Nil{}:
91 Nil{}
92 case Con{+d, rest}:
93 +more = fresh.spec(rest, seen, read)
94 +known = Bool.and(has(read, d), Bool.not(has(seen, d)))
95 Bool.pick(List<&2, String>, Bool.and(known, Bool.not(has(more, d))), d <> more, more)