def next

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

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/enc.bend as Enc

631# the loop goes on with the documents, unless the message said to quit
632def next(  # noqa: L001 serve loop IO
633  -H: Type,
634  quit: Bool,
635  h3: H,
636  ee: Enc.Enc,
637  docs: List<&2, Docs.Doc>,
638  rest: H -> Enc.Enc -> List<&2, Docs.Doc> -> IO(Unit)
639) -> IO(Unit):
640  match quit:
641    case True{}:
642      IO.pure(Unit, Unit{})
643    case False{}:
644      rest(h3, ee, docs)

Uses (7)

Used by (1)