def turn.msg
bolt@1.27.0.0 · src/lsp/server.bend:660
import bolt@1.27.0.0/src/lsp/server.bend as Server
import Base
import emerging-ezjson@1.2.0.0/main.bend as Ezjson
import emerging-ezjson@1.2.0.0/src/value.bend as J
import bolt@1.27.0.0/src/lsp/docs.bend as Docs
import bolt@1.27.0.0/src/lsp/transport/service.bend as T
import bolt@1.27.0.0/src/lsp/checker/answer.bend as C
import bolt@1.27.0.0/src/lsp/files/service.bend as F
import bolt@1.27.0.0/src/lsp/enc.bend as Enc
660
661def turn.msg(
662 ~H: Type,
663 ~tr: T.Transport<H>,
664 ~fs: F.Files,
665 ~ck: C.Checker,
666 +msg: J.Json,
667 h3: H,
668 ee: Enc.Enc,
669 docs: List<&2, Docs.Doc>,
670 rest: H -> Enc.Enc -> List<&2, Docs.Doc> -> IO(Unit)
671) -> IO(Unit):
672 +e2 = encoding(method(name_of(msg)), Ezjson.get(msg, "params"), ee)
673 do IO<Unit>:
674 out : Out <- handle(~fs, ~ck, e2, msg, docs)
675 answer(~H, ~tr, out, h3, e2, rest)