def check.go
bolt@1.27.0.0 · src/rules/pedantic/rewalk.bend:887
import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/rules/calls.bend as Calls
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
887def check.go(
888 ds: List<&2, Calls.Def>,
889 +lp: List<&2, String>,
890 +path: String,
891 acc: List<&2, List<&2, F.Finding>>
892) -> List<&2, F.Finding>:
893 match ds:
894 case Nil{}:
895 List.concat(&2, F.Finding, List.reverse(&2, List<&2, F.Finding>, acc))
896 case Con{Calls.Def{+name, +sig, +body}, rest}:
897 check.go(rest, lp, path,
898 Lazy.stop(List<&2, F.Finding>, Calls.exempt(path, sig), [],
899 _u => List.concat(&2, F.Finding, [local(body, name, lp, path), visit(body, name, lp, path)])) <> acc)