DecreasingCall.verdict: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/language/decreasing_call.bend as DecreasingCall Lines 165-199 of bend-lint-rules@0.2.0.0/language/decreasing_call.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&start_line=165&end_line=199 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # The verdict on a call's arguments against the parameters, from the one numbered `at`. def verdict( params: List<&2, Param>, args: List<&2, Lint.Node>, told: Maybe<&2, Verdict>, +smaller: List<&2, Smaller>, +lets: List<&2, U32>, +at: Nat ) -> Verdict: match params args told: case _ _ Some{v}: v case Con{Param{b, True{}, n}, ps} Con{arg, rest} None{}: verdict(ps, rest, None{}, smaller, lets, 1n+at) case Con{Param{+b, False{}, +n}, ps} Con{Lint.Node{Lint.Variable{+a}, x, s, k, f}, rest} None{}: verdict( ps, rest, step( U32.is_eq(a, b), is_smaller(smaller, False{}, b, a), List.contains(~U32, ~U32.is_eq, lets, a), at, n ), smaller, lets, 1n+at ) case Con{Param{b, False{}, n}, ps} Con{Lint.Node{Lint.Application{}, x, s, k, f}, rest} None{}: Fails{at, n} case Nil{} Nil{} None{}: Unchanged{} case _ _ None{}: Unknown{} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Syntax https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=Param https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=Smaller https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=Verdict https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=is_smaller https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=step