def rpc_start
cswap-bend-cli@0.1.0.0 · server.bend:79
import cswap-bend-cli@0.1.0.0/server.bend as Server
import Base
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/fmt/out.bend as O
79def rpc_start(r: Fs.Res(File), +fmt: O.Fmt) -> IO(Cmd.Out):
80 match r:
81 case Fail{e}:
82 IO.pure(Cmd.Out, Cmd.Out{1, "", "cswap rpc: cannot read standard input\n"})
83 case Done{f}:
84 IO.bind(Unit, Cmd.Out, stdin_pump(SRead{f, ""}, fmt), u => IO.pure(Cmd.Out, Cmd.silent()))