[Haskell-cafe] Re: Doubting Haskell

Simon Marlow simonmarhaskell at gmail.com
Mon Feb 18 08:26:17 EST 2008


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


More information about the Haskell-Cafe mailing list