1234567891011121314151617181920212223242526272829type'asource=Source:{init:unit->'s;pull:'s->('a*'s)option;stop:'s->unit;}->'asourcetype('a,'b)sink=Sink:{init:unit->'s;push:'s->'a->'s;(* Could be potentially extended to support finer grained back pressure
* control. Instead of a bool we could use [`full | `more | `wait]. *)full:'s->bool;stop:'s->'b;}->('a,'b)sinktype'astream={stream:'b.('a,'b)sink->'b}[@@unboxed]type('a,'b)flow={flow:'r.('b,'r)sink->('a,'r)sink}[@@unboxed]