
On Mar 10, 2014 1:54 PM, "Johan Tibell"
On Mon, Mar 10, 2014 at 1:47 PM, Ian Lynagh
wrote: On Mon, Mar 10, 2014 at 02:32:06PM +0200, Michael Snoyman wrote:
On Mon, Mar 10, 2014 at 2:30 PM, Johan Tibell
wrote:
I propose we add it to System.IO. Note that we'd have to copy the 5
in System.Posix.IO.createPipe into base as the above implementation would otherwise depend on the unix package.
+1. I've needed this in the past when working with process, and ended up writing POSIX-only code as a result.
Would it make more sense to put it in process, and thus avoid needing to copy/move code into base?
I'm certainly open to that idea. If the only uses of pipes are for
lines processes, I think that makes sense. Are there any typical non-process uses of pipes? I can't think of any right now. Yes: transferring data from one socket to another in a zero-copy fashion using the 'splice' syscall in Linux requires passing stuff through a pipe (used as a buffer). I for one wouldn't consider a dependency on 'process' to write such code (if I ever would in Haskell...) to be a problem though. Nicolas