[nhc-bugs] nhc doesn't block buffer correctly

Ian Lynagh igloo@earth.li
Wed, 28 Nov 2001 11:43:56 +0000


With this function:

> module Main where

> import IO

> main :: IO()
> main = do hSetBuffering stdout (BlockBuffering (Just 3))
>           putStr ("abcdefgh" ++ inf)

> inf = inf

nhc98 produces no output. The library report says:

For output, items are written out, or flushed, from the internal buffer
according to the buffer mode:

* block-buffering: the entire buffer is written out whenever it
  overflows, a hFlush is issued, or the handle is closed.

An implementation is free to flush the buffer more frequently, but not
less frequently, than specified above.


Thanks
Ian