On 01/01/06, Glynn Clements <[EMAIL PROTECTED]> wrote:
>
> Cale Gibbard wrote:
>
> > You shouldn't have to flush output manually. Which implementation are
> > you using? Try importing System.IO and doing:
> > hGetBuffering stdout >>= print
> > and see what gets printed. It should be "NoBuffering".
>
> The buffering for stdout should be LineBuffering if stdout is a
> terminal and BlockBuffering otherwise. The buffering for stderr should
> always be NoBuffering.

It's actually not, if you're starting your program from ghci, which is
what confused me. From GHCi, you get NoBuffering on stdout, and
LineBuffering on stdin, which is sane for interactive programs. Why
anyone would want LineBuffering as default on stdout is somewhat
mysterious to me.

 - Cale
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to