src/lsp/checker/bend.bend relies on unsafe/foreign
raw source on the hub · import bolt@1.21.0.0/src/lsp/checker/bend.bend as Bend
checker/bend: an effect (CPU event loop only): the diagnostics of the file
at a path. It runs bend on the file and reads its report. Which runs it
makes is argv.bend's, and what its output answers is answer.bend's, both
pure; this file only performs them. service hands it to the server and
to bolt check, which take the checker as a service and never import this
file, so their proofs reach no foreign code.
6 imports
import Base import ./answer.bend as S import ./argv.bend as Argv import ../report.bend as Rep import ./names.bend as Names import ../files/disk.bend as Disk
Definitions
def launch source · line 26 · raw
@rr:0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/argv.Run -> IO(String)
what a run of bend answered, tag first; every run is argv.bend's, so it checks and never runs main
def settle source · line 32 · raw
@mr:Maybe<&2, 0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/argv.Run> -> @+ds:List<&2, 0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/report.Diag> -> IO(0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Answer)
the first report, settled by the run that follows it (a LAWS.bend's PROOF.bend), when argv.bend gives one
def checked source · line 42 · raw
@+ds:List<&2, 0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/report.Diag> -> @+path:String -> IO(0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Answer)
the diagnostics of a run, settled by the run that follows it
def settled source · line 46 · raw
@aa:0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Answer -> @+path:String -> IO(0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Answer)
a run's answer: its diagnostics settled when bend ran, else no check
def check source · line 55 · raw
@+path:String -> IO(0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Answer)
bend's report on the file, its errors placed by the names of the file's items (read from the file bend read; unknown when it cannot be read)
def service source · line 62 · raw
0xcb00b2b8895301b86fb365a9ceb6e119/src/lsp/checker/answer.Checker
the checker as a service (answer.bend's Checker)
Effects (foreign code)
effect bendcheck.exec source · line 20 · raw
@path:String -> @flag:String -> IO(String)
how bend <path> <flag> went, one tag char, then everything it printed.
The flag is argv.bend's, --check-only: it checks, and never runs main.
The tag is r when bend ran and exited, s when a signal killed it, and
x when it could not be run: no pipe, no fork, or an exit with 127, the
code a failed exec exits with (as a shell does for a command it cannot
find)
foreign: src/lsp/checker/exec.c, src/lsp/checker/exec.js