def answer

bolt@1.27.0.0 · src/lsp/server.bend:646

import bolt@1.27.0.0/src/lsp/server.bend as Server
import Base
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/enc.bend as Enc

646# the replies sent, then the loop goes on
647def answer(  # noqa: L001 serve loop IO
648  ~H: Type,
649  ~tr: T.Transport<H>,
650  out: Out,
651  h3: H,
652  ee: Enc.Enc,
653  rest: H -> Enc.Enc -> List<&2, Docs.Doc> -> IO(Unit)
654) -> IO(Unit):
655  Out{replies, quit, docs} = out
656  do IO<Unit>:
657    h2 : H <- send_all(~H, ~tr, replies, h3)
658    next(H, quit, h2, ee, docs, rest)

Uses (10)

Used by (1)