Flow.Pi
module type SOURCE = sig ... end
module type SINK = sig ... end
module type SHUTDOWN = sig ... end
val source :
(module SOURCE with type t = 't) ->
('t, source_ty) Resource.handler
val sink : (module SINK with type t = 't) -> ('t, sink_ty) Resource.handler
val shutdown :
(module SHUTDOWN with type t = 't) ->
('t, shutdown_ty) Resource.handler
module type TWO_WAY = sig ... end
val two_way :
(module TWO_WAY with type t = 't) ->
('t, two_way_ty) Resource.handler
type Resource.pi +=
| Source : ('t, (module SOURCE with type t = 't), [> source_ty ]) Resource.pi
| Sink : ('t, (module SINK with type t = 't), [> sink_ty ]) Resource.pi
| Shutdown : ('t, (module SHUTDOWN with type t = 't), [> shutdown_ty ])
Resource.pi