linter/api/impl.bend checks
raw source on the hub · import bend-lint-api@0.3.7.0/linter/api/impl.bend as Impl
3 imports
import Base import ../../shared.bend as Shared import ./spec.bend as Spec
Types
type Imported source · line 7 · raw
Data
The nodes written with an alias's prefix (U.two, a fill def U.law(x):), by alias; and those that use Base: a
global name with no namespace that the file does not declare (last first).
Imported@aliases:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @base:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> Imported
type Uses source · line 13 · raw
Data
The program's files (one of them is what an import loads), the uses of global names in the files the declarations are read in, by name, the uses of the declaration's binders, by binder (each last first), and what uses its file's imports.
Uses@sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @globals:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @binders:0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @imported:Imported -> Uses
type Answer source · line 21 · raw
Data
Shown@text:String -> Answer
Equal@same:Bool -> Answer
Normalized@handle:U32 -> Answer
Definitions
def Syntax.target source · line 48 · raw
@syntax:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Syntax -> Maybe<&2, String>
The global name a node of this kind declares or uses, if any (an import's is the file it loads).
def Syntax.used source · line 76 · raw
@syntax:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Syntax -> Maybe<&2, String>
The global name a node of this kind uses, if it uses one.
def Syntax.binder source · line 94 · raw
@syntax:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Syntax -> Maybe<&2, U32>
The binder a node of this kind declares, or, for a variable, uses.
def Node.syntax source · line 138 · raw
@node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Syntax
def Node.scrutinees.go source · line 190 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>
def calls source · line 224 · raw
@called:String -> @owner:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> Bool
def is_live.go source · line 251 · raw
@path:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Above> -> @ok:Bool -> Bool
def parameter.go source · line 295 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @found:Maybe<&2, Nat> -> @+binder:U32 -> @+at:Nat -> Maybe<&2, Nat>
def Value.flag source · line 332 · raw
@value:Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Value> -> Bool
def Uses.global.add source · line 348 · raw
@used:Maybe<&2, String> -> @node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @m:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
Declarations ============
def Uses.global source · line 359 · raw
@+u:Unit -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @m:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
def Uses.binder.add source · line 366 · raw
@+t:0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @+b:U32 -> @node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> 0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
def Uses.binder source · line 384 · raw
@+u:Unit -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @t:0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> 0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
def Imported.own.add source · line 395 · raw
@target:Maybe<&2, String> -> @out:Set -> Set
def Imported.own source · line 403 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @out:Set -> Set
The global names a file's own top-level declarations declare, as a set.
def Imported.is_base source · line 410 · raw
@own:Set -> @used:Maybe<&2, String> -> Bool
def Imported.alias source · line 417 · raw
@prefix:String -> @node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @aliases:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
def Imported.add source · line 428 · raw
@+own:Set -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @uses:Imported -> Imported
def Imported.of source · line 440 · raw
@+nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> Imported
def Declarations.namespace source · line 452 · raw
@sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+path:String -> @found:Maybe<&2, String> -> String
The namespace of the file at path, as the check names it (found, once found): "" for Base, or a file the check
did not parse.
def Declarations.imported source · line 466 · raw
@base:Bool -> @alias:String -> @imported:Imported -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>
The uses of an import, in order: of Base (base), or of its alias.
def Declarations.bound source · line 473 · raw
@binder:Maybe<&2, U32> -> @binders:0x534e77ab9e7d8d3c817c84cab8139f38/shared.Tables.Table<List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>
def Declarations.declared source · line 492 · raw
@declares:Maybe<&2, Bool> -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @uses:Uses -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
def Declarations.node source · line 511 · raw
@+uses:Uses -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
A node's declaration, if it declares a name, with its uses, onto out.
def Declarations.tops source · line 535 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @+sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+globals:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @+imported:Imported -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
def Declarations.files source · line 573 · raw
@files:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+globals:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
def Declarations.globals source · line 590 · raw
@files:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @m:Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>> -> Map<&2, List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node>>
def Declarations.of source · line 604 · raw
@+files:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
The declarations of files, in order, with their uses in files; sources are the program's files.
def Declarations.when source · line 619 · raw
@declare:Bool -> @files:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration>
def Source.is_own source · line 630 · raw
@source:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source -> Bool
def Quantity.is_runtime source · line 648 · raw
@quantity:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Quantity -> Bool
Whether a parameter of this quantity is there at run time.
def Def.params source · line 658 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Param> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Param>
The runtime parameters among a definition's nodes, in order, onto out.
def Def.called.visit source · line 702 · raw
@+u:Unit -> @+path:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Above> -> @+node:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node -> List<&2, String>
The definition an application below path calls by name.
def Def.returned source · line 716 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> String
The type a definition's nodes say it returns, as one name, or "".
def Program.defs.file source · line 733 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @out:Map<&2, Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def>> -> Map<&2, Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def>>
The definitions among a file's nodes, by the name the check gives them, onto out.
def Program.callers.if source · line 769 · raw
@found:Bool -> @t:String -> @callers:Set -> Set
def Program.callers.step source · line 777 · raw
@info:Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def> -> @+callers:Set -> Set
callers with the definition info, if it calls one of them.
def Program.callers.file source · line 789 · raw
@nodes:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Node> -> @+defs:Map<&2, Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def>> -> @callers:Set -> Set
callers after a step for each definition among a file's nodes, in order.
def Program.callers.pass source · line 806 · raw
@sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+defs:Map<&2, Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def>> -> @callers:Set -> Set
def Program.callers.go source · line 818 · raw
@fuel:Nat -> @same:Bool -> @+sources:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source> -> @+defs:Map<&2, Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Def>> -> @+callers:Set -> Set
Passes over the program until one adds nothing (same), or fuel runs out.
def Whole.sources source · line 898 · raw
@whole:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Whole -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Source>
def Whole.option source · line 903 · raw
@whole:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Whole -> @name:String -> Maybe<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Value>
def ask.step source · line 910 · raw
@-R:Type -> @questions:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Question> -> @k:(@_:List<&2, Answer> -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Step<R>) -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Step<R>
Asking the checker ==================
def ask source · line 922 · raw
@questions:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Question> -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Ask(List<&2, Answer>)
The answers to questions, in order, asked in one round; none asked, no round.
def Answer.text source · line 928 · raw
@answers:List<&2, Answer> -> String
def Answer.same source · line 935 · raw
@answers:List<&2, Answer> -> Bool
def Answer.type source · line 943 · raw
@t:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef -> @answers:List<&2, Answer> -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef
t with the handle of its normal form, if the answers give one.
def show source · line 950 · raw
@t:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Ask(String)
def same source · line 958 · raw
@a:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef -> @b:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Ask(Bool)
def normal source · line 966 · raw
@+t:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Ask(0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef)
def Question.shows source · line 974 · raw
@types:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.TypeRef> -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Question> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Question>
def Answer.texts source · line 984 · raw
@answers:List<&2, Answer> -> @out:List<&2, String> -> List<&2, String>