
15 Sep
2008
15 Sep
'08
4:21 a.m.
On 15 Sep 2008, at 12:51 pm, Daniel Fischer wrote:
Am Montag, 15. September 2008 02:24 schrieb Cetin Sert:
Hi why do I get?
Buffering. For compiled programmes, stdin and stdout are line- buffered by default, so the output doesn't appear until the program finishes. Either put hSetBuffering stdout NoBuffering at the top of main or, better IMO, insert a hFlush stdout into ask before the readLn. And in eval, putStrLn would be better, I think.
Is this the problem we've had before, where the example in the Haskell 98 Report could not possibly work unless Haskell followed the same rule as C (read from stdin *automatically* flushes stdout), and the example works in several other Haskell systems, but not in GHC? Or is this a different problem?
6140
Age (days ago)
6140
Last active (days ago)
0 comments
1 participants
participants (1)
-
Richard A. O'Keefe