Proposal: add createPipe to base

Nicolas Trangez nicolas at
Mon Mar 10 19:41:23 UTC 2014

On Mar 10, 2014 1:54 PM, "Johan Tibell" <johan.tibell at> wrote:
> On Mon, Mar 10, 2014 at 1:47 PM, Ian Lynagh <igloo at> 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 <johan.tibell at
>> >
>> > > 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
>> > > otherwise depend on the unix package.
>> > >
>> > +1. I've needed this in the past when working with process, and ended
>> > 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
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list