Io.stdio.loop: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/io.bend as Io Lines 371-384 of ezmcp@0.1.0.0/src/io.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/io.bend&start_line=371&end_line=384 import Base import emerging-ezjson@1.2.0.0/src/value.bend as Value import ezmcp@0.1.0.0/src/rpc.bend as Rpc import ezmcp@0.1.0.0/src/server.bend as Server # read, act on every whole line, and read again until stdin ends; `rev` is # the revision the next line is read by @unsafe def stdio.loop( ~C: Data, ~run: C -> String -> Value.Json -> IO(Rpc.Out), ~srv: Server.Server, +ctx: C, buf: List<&2, U32>, rev: String ) -> IO(Unit): IO.bind(Result<&1, &1, U32 & String, List<&2, U32>>, Unit, ezmcp.stdin(stdio.chunk()), res => stdio.got(C, run, srv, ctx, rev, buf, rest => after => stdio.loop(C, run, srv, ctx, rest, after), res)) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/io.bend&name=ezmcp.stdin https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/io.bend&name=stdio.chunk https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/io.bend&name=stdio.got https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Out https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Server