haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Re: Handles with their IOMode in their type

Subject: Re: [Haskell-cafe] Re: Handles with their IOMode in their type
From: Jason Dagit
Date: Wed, 9 Dec 2009 23:51:06 -0800


On Wed, Dec 9, 2009 at 6:00 PM, Brandon S. Allbery KF8NH <allbery@xxxxxxxxxxx> wrote:
On Dec 9, 2009, at 16:51 , Bas van Dijk wrote:
I will change the types to:

stdin :: Handle ReadMode
stdout :: Handle WriteMode
stderr :: Handle WriteMode

Or are there scenarios where people want to write to stdin or read
from stdout or stderr?


These situations *do* come up; the controlling terminal for a program is open read/write on all 3 file descriptors initially, ands programs like more/less/pg rely on this and do their I/O on stdout.  Additionally, on *BSD pipes are actually socketpairs and therefore bidirectional, and a small number of programs rely on this.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
<Prev in Thread] Current Thread [Next in Thread>