src/lsp/server.bend checks
raw source on the hub · import bolt@1.66.0.0/src/lsp/server.bend as Server
lsp/server: the loop. The transport the messages ride on, the files
behind imports and Base, and the checker behind the diagnostics are passed
in (transport/, files/, checker/answer.bend's Checker; checker/bend.bend's
service is the real checker). The open documents are the
loop's state. The checker runs on open and save, against the file on disk;
the linter on every open, change and save, on the text the editor shows,
each file told the role the imports of the tree give it, read as bolt
<path> reads them (src/lint/plan.bend's graph) on open and save and kept
for the changes between.
23 imports
import Base import ezjson@1.2.0.0/main.bend as Ezjson import ezjson@1.2.0.0/src/value.bend as J import ./proto.bend as Proto import ./docs.bend as Docs import ./nav.bend as Nav import ./semantic.bend as Semantic import ../rules.bend as Lint import ../finding.bend as Finding import ../config.bend as Config import ../lint/plan.bend as Plan import ../lint/world.bend as W import ../role.bend as Role import ../src.bend as Src import ../noqa.bend as Noqa import ./transport/service.bend as T import ./checker/answer.bend as C import ./files/service.bend as F import ./report.bend as Rep import ./enc.bend as Enc import ../syntax/outline.bend as Outline import ../syntax/lex.bend as Lex import ../syntax/word.bend as Word
Types
type Method source · line 35 · raw
Data
the methods the server answers; MOther is anything else
MInitializeMethod
MShutdownMethod
MExitMethod
MOpenMethod
MChangeMethod
MSaveMethod
MCloseMethod
MHoverMethod
MDefinitionMethod
MSymbolsMethod
MCompletionMethod
MReferencesMethod
MRenameMethod
MSemanticMethod
MOtherMethod
type Reply source · line 54 · raw
Data
a message the server sends: a notification, already printed, or the response to a request, its result or its error
RNote@body:String -> Reply
RResult@id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @result:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> Reply
RError@id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @code:String -> @message:String -> Reply
type Answer source · line 60 · raw
Data
what a request is answered with: a result, or an error's code and message
Answer@result:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> Answer
Refusal@code:String -> @message:String -> Answer
type Work source · line 66 · raw
Data
what the work behind a method gave: the notifications it sends, the answer (read for a request only), the documents after it. It never sees the id
Work@notes:List<&2, String> -> @answer:Answer -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
type Out source · line 70 · raw
Data
what one message leads to: the replies to send, whether to stop, the documents
Out@replies:List<&2, Reply> -> @quit:Bool -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Out
type Role source · line 75 · raw
Data
how the server treats a method: a request owed one response, a notification, exit, or a method it does not know
RRequestRole
RNoticeRole
RExitRole
RUnknownRole
Definitions
def method source · line 82 · raw
@+name:String -> Method
a method by its name
def role source · line 100 · raw
@m:Method -> Role
a method's role
def name_of source · line 134 · raw
@msg:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> String
a message's method name, empty when it has none
def id_of source · line 138 · raw
@msg:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json
a message's id: null for a notification
def uri_of source · line 142 · raw
@params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> String
the document a request is about
def opened_text source · line 146 · raw
@params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> String
the text a didOpen carries: its document's, or none
def changed_text source · line 151 · raw
@params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> String
the text a didChange carries: its first content change's, which is the whole document (the server asks for full sync), or none
def line_of source · line 156 · raw
@params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> U32
the line of a request's position
def col_of source · line 160 · raw
@params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> U32
the character of a request's position
def text source · line 164 · raw
@r:Reply -> String
a reply as the text sent
def notices source · line 174 · raw
@ns:List<&2, String> -> List<&2, Reply>
notifications as replies
def respond source · line 182 · raw
@id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @a:Answer -> Reply
the response to the request with this id
def unknown source · line 190 · raw
@id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> List<&2, Reply>
a request the server does not know is refused; a notification is ignored
def answered source · line 198 · raw
@result:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
the work of a request: its result, no notifications
def noted source · line 202 · raw
@notes:List<&2, String> -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
the work of a notification: what it sends, and no answer
def step.go source · line 205 · raw
@r:Role -> @id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @w:Work -> Out
def step source · line 223 · raw
@m:Method -> @id:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @w:Work -> Out
the dispatcher's decision for one message, whatever its method's work gave: a request gets one response with its id, a notification its notices, exit stops, and a method it does not know is refused or ignored
def pub.note source · line 234 · raw
@c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @uri:String -> @ds:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/report.Diag> -> @gs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/finding.Graded> -> String
a document's diagnostics, as the notification sent: the checker's errors, then the linter's findings
def pub.cands source · line 239 · raw
@cwd:String -> @path:String -> List<&2, String>
the bolt.bend candidates of a document's path, nearest first: the ones the CLI reads for a file at that path, run from the same directory
def pub.lint source · line 248 · raw
@+path:String -> @+text:String -> @rs:List<&2, Maybe<&2, String>> -> @ms:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark> -> List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/finding.Graded>
the linter's findings on the text the editor shows, each rule told the
file's role among the marks, at the levels the nearest bolt.bend read gives
them, less what the text's noqa comments
silence, then the noqa rule's, which judges no project rule's code (the
editor runs none); none for a bolt.bend, which is bolt's configuration,
not source
def pub.marks source · line 261 · raw
@+world:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World -> List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark>
the role marks bolt <path> reads from a World: the imports of every file
of the tree (Plan.graph), each file read for its imports alone
def pub.checked source · line 266 · raw
@e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @+text:String -> @+ds:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/report.Diag> -> @rs:List<&2, Maybe<&2, String>> -> @+ms:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark> -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
open or save: the checker's errors with the lint of the text, the errors kept for the changes after
def pub.open source · line 279 · raw
@e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @+text:String -> @ds:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/report.Diag> -> @rs:List<&2, Maybe<&2, String>> -> @+ms:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark> -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
open: the document's text kept, then published with the checker's errors
def pub.save source · line 291 · raw
@e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @ds:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/report.Diag> -> @rs:List<&2, Maybe<&2, String>> -> @+ms:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark> -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
save: the text the editor shows published with the checker's new errors
def pub.change source · line 303 · raw
@e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @+text:String -> @rs:List<&2, Maybe<&2, String>> -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
change: the new text kept, and its lint published with the checker's last errors and the marks read with them
def pub.close source · line 314 · raw
@e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> Work
close: the document forgotten, and an empty list published
def pub.read.answer source · line 324 · raw
@m:Maybe<&2, String> -> 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Answer
a file's text as an answer
def pub.world.more source · line 356 · raw
@world:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World -> @rs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Reply> -> 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World
the World with more answers in it
def hover.of source · line 422 · raw
@m:Maybe<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/nav.Found> -> 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json
def definition.of source · line 431 · raw
@c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @m:Maybe<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/nav.Found> -> 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json
def col_in source · line 442 · raw
@c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> U32
the column a request's position names, read in the negotiated encoding of the document's text
def references.of source · line 500 · raw
@c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @s:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/nav.Sites -> @uri:String -> @name:String -> 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json
def rename.of source · line 505 · raw
@c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @s:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/nav.Sites -> @uri:String -> @name:String -> @new:String -> Answer
only a name bound in the document renames; the editor shows the refusal
def encoding source · line 605 · raw
@m:Method -> @params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc
the encoding after a message: initialize settles it (enc.bend's negotiate); every other message keeps it
def encoding.of source · line 614 · raw
@+msg:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc
the encoding after a message, read off the message itself: its method, and
its params member for initialize to negotiate from
def decoded source · line 631 · raw
@m:Maybe<&2, 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json> -> 0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json
a parsed message, or null when it did not parse
def next source · line 645 · raw
@-H:Type -> @quit:Bool -> @h3:H -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @rest:(@_:H -> @_:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @_:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)) -> IO(Unit)
the loop goes on with the documents, unless the message said to quit
Templates
template pub.configs source · line 318 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @+uri:String -> IO(List<&2, Maybe<&2, String>>)
the texts of a document's bolt.bend candidates, as the files hold them
template pub.answer source · line 333 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @ask:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Ask -> IO(0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Answer)
one question of the planner's, answered from the files: a directory's entries, or a file's text (a directory reads as no text)
template pub.answers source · line 345 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @asks:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Ask> -> IO(List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Reply>)
every question answered, in order
template pub.world.step source · line 362 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @asks:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.Ask> -> @+world:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World -> @go:(@_:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World -> IO(0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World)) -> IO(0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World)
the planner's questions answered and the World gone round again, or the World as it is once the planner asks none
template pub.world.go source · line 378 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @fuel:Nat -> @+world:0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World -> IO(0x243ea54885fbd6711eb0dc5731e3043f/src/lint/world.World)
the World bolt <path> reads, gathered as src/lint.bend gathers it: the
planner's questions answered until it asks none, under the same fuel
template pub.seen source · line 387 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @+uri:String -> IO(List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/role.Mark>)
the role marks the tree's imports give a document, as bolt <path> reads
them
template pub.opened source · line 394 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @text:String -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Work)
open, on the checker's run on the file on disk
template pub.saved source · line 409 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Work)
save, on the checker's run on the file on disk
template pub.changed source · line 417 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+uri:String -> @text:String -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Work)
change: the linter only
template hovered source · line 446 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> IO(Work)
hover at a request's position
template defined source · line 459 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> IO(Work)
definition at a request's position
template complete.with source · line 472 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @c:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Cols -> @+prefix:String -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @uri:String -> @+line:U32 -> @+col:U32 -> IO(Work)
template complete source · line 486 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> IO(Work)
the candidates for the name being typed at a position
template references source · line 514 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> IO(Work)
every position of the name at a position
template renamed source · line 530 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> IO(Work)
the edit renaming the name at a position, or a refusal
template semantic source · line 549 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @uri:String -> IO(Work)
the document's semantic tokens
template symbols source · line 555 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @+uri:String -> IO(Work)
the document's symbols
template work source · line 563 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @enc:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @m:Method -> @+params:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @+docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Work)
the work behind a method: what the checker, the files and the documents give it. It does not see the message's id: step alone puts that on a reply
template handle source · line 618 · raw
@-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @+msg:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Out)
one message: its method's work, then step's decision on it
template send_all source · line 635 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @replies:List<&2, Reply> -> @h3:H -> IO(H)
every reply sent, in order
template answer source · line 660 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @out:Out -> @h3:H -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @rest:(@_:H -> @_:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @_:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)) -> IO(Unit)
the replies sent, then the loop goes on
template turn.msg source · line 674 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @+msg:0xa81e161008ecc2f297c0a3065cb9b188/src/value.Json -> @h3:H -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @rest:(@_:H -> @_:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @_:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)) -> IO(Unit)
a message handled under the encoding it leaves, and answered
template turn source · line 691 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @m:Maybe<&2, String> -> @h3:H -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @rest:(@_:H -> @_:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @_:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)) -> IO(Unit)
one message body handled and answered; none means the peer is gone
template got source · line 709 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @r:Pair(H, Maybe<&2, String>) -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> @rest:(@_:H -> @_:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @_:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)) -> IO(Unit)
what recv gave: the handle and maybe a body
template serve.go source · line 722 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @fuel:Nat -> @h3:H -> @e:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/enc.Enc -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)
template serve source · line 742 · raw
@-H:Type -> @-tr:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/transport/service.Transport<H> -> @-fs:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/files/service.Files -> @-ck:0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/checker/answer.Checker -> @fuel:Nat -> @h3:H -> @docs:List<&2, 0x243ea54885fbd6711eb0dc5731e3043f/src/lsp/docs.Doc> -> IO(Unit)
serves until exit, the peer's end, or the fuel's (a message each), in UTF-16 until initialize negotiates