type Fact
import bend-lint-api@0.2.0.0/linter/lint.bend as Lintimport Base
88# What the checker found for a node of the source: what the fact says of it, the quantity (how often the term is
89# demanded, or the binder's), for a binder of a parameter, lambda, let or case, how often its body uses it (the most of
90# its checked copies; none for a parameter a match takes apart), and the type. A fact is never wrong, but a node can
91# have none: a term the checker rewrote into another (a scrutinee used again, a call a template took) is not typed as
92# itself. A node has one fact per distinct type: pattern compilation can check one term in several branches, under
93# different refinements.
94type Fact is Data:
95 Fact{role: Role, quantity: Quantity, used: Maybe<&2, Quantity>, checked: TypeRef}