Stephan Tobies [EMAIL PROTECTED] writes:
When tryin to remove the buffering for stdout with
hSetBuffering stdout NoBuffering
as part of a ghc-0.29 compiled program, running the prgram fails with
Fail: I/O error: UnsupportedOperation: can't set buffering for a dirty
handle
This is a bug, or rather a small corner of the IO library that isn't
yet implemented in GHC. The spec says that changing the buffering to
NoBuffering should flush the buffer and succeed, but GHC will refuse
to set the buffering if the handle has already been used.
The Official Workaround is to set the buffering before doing any other
operations on the handle.
Cheers,
Simon
--
Simon Marlow [EMAIL PROTECTED]
University of Glasgow http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key