Bryan O'Sullivan wrote:
Stefan O'Rear wrote:
I'll bet that breaks horribly in the not-so-corner case of /dev/tty.
Actually, it doesn't. It seems to do a read behind the scenes if the
buffer is empty, so it blocks until you type something.
Indeed, and this is why even an unbuffered Handle needs to have a
1-character buffer, an interesting fact I discovered when implementing the
I/O library.
Cheers,
Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe