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
143143
144144let pipe (type tag ) ~sw ((Resource. T (v , ops )) : [> tag mgr_ty ] r ) =
145145 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
147150
148151let parse_out (type tag ) (t : [> tag mgr_ty] r ) parse ?cwd ?stdin ?stderr ?is_success ?env ?executable args =
149152 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 :
140140
141141(* * {2 Pipes} *)
142142
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
144144(* * [pipe ~sw mgr] creates a pipe backed by the OS.
145145
146146 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