def send_all

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

import bolt@1.27.0.0/src/lsp/server.bend as Server
import Base
import bolt@1.27.0.0/src/lsp/transport/service.bend as T

621# every reply sent, in order
622def send_all(~H: Type, ~tr: T.Transport<H>, replies: List<&2, Reply>, h3: H) -> IO(H):  # noqa: L001 serve loop IO
623  match replies:
624    case Nil{}:
625      IO.pure(H, h3)
626    case Con{body, t}:
627      do IO<H>:
628        h2 : H <- T.send(H, tr, h3, text(body))
629        send_all(~H, ~tr, t, h2)

Uses (8)

Used by (1)