~/bend-docscommunity

main.bend relies on unsafe/foreign

raw source on the hub · import bolt@1.59.0.0/main.bend as Main

bolt: a linter, checker and language server for Bend 2.

The one binary. Shake parses the line: lint, or a word that is no subcommand, or nothing, lints the files named after it (every .bend file under the current directory when none are); check runs the checker on them; fmt formats them, or with --check lists the ones it would; lsp serves an editor over stdio; help (or --help) prints usage; --version prints the release and the short commit when the build has one. Build it native (bend main.bend -o bin/bolt.bin). bolt lsp runs on the cores: with no runtime --gpu it is +RTS --gpu off -RTS lsp, and +RTS --gpu on -RTS or +RTS --gpu 4GB -RTS asks for the device. Runtime options go between +RTS and -RTS (bend 2.0.38); bolt declares no --gpu of its own, so bolt --gpu off is an unknown option. What the line does is Args.out's decision (src/LAWS.bend proves it); this file only does it, and LAWS.bend states what src/stop.bend's say and leave do. Everything under src/ is internal.

8 imports
import Base
import ./src/args.bend as Args
import ./src/lint.bend as Lint
import ./src/fmt/run.bend as FmtRun
import ./src/check.bend as Check
import ./src/lsp/run.bend as Lsp
import ./src/lsp/checker/bend.bend as BendChecker
import ./src/stop.bend as Stop

Definitions

def dispatch source · line 27 · raw

@cmd:0xace24ae64a36369bd02380967fccdfd3/src/args.Cmd -> @paths:List<&2, String> -> IO(Unit)

what a subcommand runs, over the files after it

def perform source · line 39 · raw

@o:0xace24ae64a36369bd02380967fccdfd3/src/args.Out -> IO(Unit)

what a parsed line does, done

def main source · line 48 · raw

IO(Unit)