<br>Hi all,<br><br>A bit strange behaviour with hPutStrLn. Consider following program:<br><br>main = do<br> handle <- openFile "output.txt" WriteMode<br> hPutStrLn handle (unlines contLines2)<br> -- hFlush houtput
<br> where<br> contLines2 = flip map [1..2000] $ <br> \x -> show x ++ " been there done that"<br><br>Outputs file which ends with following lines:<br><br>1989 been there done that<br>1990 been there done that
<br>1991 been there done that<br>1992 been there done that<br>199<br>(END)<br><br>So the output is truncated. When I uncomment hFlush, file is fully written. <br>Is this expected/documented behaviour?<br><br>Platform: WinXP, GHC version
6.4.1<br><br>-- <br>Regards,<br>Gracjan<br><br>