[Haskell-cafe] Replacing stdin from within Haskell

Brandon Allbery allbery.b at gmail.com
Fri Jun 10 17:42:59 CEST 2011

On Fri, Jun 10, 2011 at 00:36, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:
> The point is that they *could* have.   The fact that they do not has
> nothing whatever to do with UNIX.  It was a Haskell design decision.

I have this feeling you're looking at it backwards...  The question
was whether GHC could do this.  My answer was based on "given the way
GHC's I/O manager works, it would require the OS to support
thread-independent file descriptors"; if I understand you correctly,
this is an unacceptable approach, the only valid one being "given that
OSes don't implement per-thread file handles, GHC is not designed to
do this".  So, why is that a privileged viewpoint?

More information about the Haskell-Cafe mailing list