
17 Jul
2011
17 Jul
'11
1:41 p.m.
If you open a file for writing and then exit with output unflushed, then Haskell does not flush the file for you. In ghci the program seems to work, but then when you compile it in ghc it mysteriously fails. I've just been bitten by this, but when I went to the bug tracker I found http://hackage.haskell.org/trac/ghc/ticket/4119 ticket 4119, which describes this behaviour and was resolved as "invalid". So presumably this behaviour is by design. Given that most environments get this right, why doesn't Haskell? Paul.