~/bend-docscommunity

language/decreasing_call.bend fails

raw source on the hub · import bend-lint-rules@0.1.0.0/language/decreasing_call.bend as Decreasing_call

language/decreasing_call: a call of a definition to itself that Bend cannot prove smaller, so the check fails ("a decreasing self-call"). Heuristics: as Bend's checker does, it reads the arguments left to right against the parameters: each must be passed unchanged until one is smaller, a field that a match on that parameter took apart (p of case 1n+p:). Erased parameters do not count. An argument that is a call, or another variable, is not smaller. One that is a literal or a constructor is left to the checker: the rule does not report it. Bend's checker stops at its first error; this rule reports every such call at once. An @unsafe definition (def f?) may call itself freely, and a call in a type (a pair type A & B, a type's arguments, an equality) is not checked.

3 imports
import Base
import bend-lint-api@0.1.0.0/linter/lint.bend as Lint
import bend-lint-api@0.1.0.0/shared/lists.bend as Lists