def earlier
bolt@1.27.0.0 · src/rules/pedantic/rewalk.bend:789
import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
import Base
789
790def earlier(seen: List<&2, Rated>, +name: String, +args: String, +line: U32, +col: U32) -> Bool:
791 match seen:
792 case Nil{}:
793 False{}
794 case Con{Rated{Site{+nm, +as, +l, +c, len, how}, +nar}, rest}:
795 +same = Bool.and(String.eq(nm, name), String.eq(as, args))
796 +diff = Bool.not(Bool.and(U32.is_eq(l, line), U32.is_eq(c, col)))
797 +here = Bool.and(Bool.and(same, diff), nar)
798 +more = earlier(rest, name, args, line, col)
799 Bool.or(here, more)