def recv.loop
import bolt@1.27.0.0/src/lsp/transport/stdio.bend as Stdioimport Base
import bolt@1.27.0.0/src/lsp/frame.bend as Frame
68def recv.loop(fuel: Nat, h2: Stdio) -> IO(Stdio & Maybe<&2, String>):
69 match fuel:
70 case 0n:
71 IO.pure(Stdio & Maybe<&2, String>, (h2, None{}))
72 case 1n+f:
73 Stdio{inp, out, +buf} = h2
74 recv.on(Frame.cut(buf), inp, out, buf, hh => recv.loop(f, hh))