Re: Dirty handle...

1997-11-11 Thread Simon Marlow

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



Dirty handle...

1997-11-10 Thread Stephan Tobies

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

What is the problem?
-- 
Stephan Tobies, Student of Computer Science, RWTH Aachen
  mailto:[EMAIL PROTECTED]
## There is much pleasure to be gained
   from useless knowledge - B. Russel ##