File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,10 @@ let run t ?cwd ?stdin ?stdout ?stderr ?(is_success = Int.equal 0) ?env ?executab
143
143
144
144
let pipe (type tag ) ~sw ((Resource. T (v , ops )) : [> tag mgr_ty ] r ) =
145
145
let module X = (val (Resource. get ops Pi. Mgr )) in
146
- X. pipe v ~sw
146
+ let r, w = X. pipe v ~sw in
147
+ let r = (r : [Flow.source_ty | Resource.close_ty] r :> [< Flow.source_ty | Resource.close_ty] r ) in
148
+ let w = (w : [Flow.sink_ty | Resource.close_ty] r :> [< Flow.sink_ty | Resource.close_ty] r ) in
149
+ r, w
147
150
148
151
let parse_out (type tag ) (t : [> tag mgr_ty] r ) parse ?cwd ?stdin ?stderr ?is_success ?env ?executable args =
149
152
Switch. run ~name: " Process.parse_out" @@ fun sw ->
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ val parse_out :
140
140
141
141
(* * {2 Pipes} *)
142
142
143
- val pipe : sw :Switch .t -> _ mgr -> [Flow .source_ty | Resource .close_ty ] r * [Flow .sink_ty | Resource .close_ty ] r
143
+ val pipe : sw :Switch .t -> _ mgr -> [< Flow .source_ty | Resource .close_ty ] r * [< Flow .sink_ty | Resource .close_ty ] r
144
144
(* * [pipe ~sw mgr] creates a pipe backed by the OS.
145
145
146
146
The flows can be used by {!spawn} without the need for extra fibers to copy the data.
You can’t perform that action at this time.
0 commit comments