
For my purposes (transaction logging for my database server) I need to be able to guarantee that data is written to disk. That is, it isn't enough to disable buffering in the compiler libraries (all libraries, more accurately), I need to also force the O/S to flush the data to disk. This is difficult to do in a portable manner, obviously, but if a practical way can be found it would have many uses in systems using transactional semantics. It would also get rid of an FFI dependency for my code. On Monday, August 4, 2003, at 11:50 PM, Ketil Z. Malde wrote:
"Simon Marlow"
writes: class Stream s where closeStream :: s -> IO () StreamSetBuffering :: s -> BufferMode -> IO () :
Just a minor suggestion, since I think some of the names get a bit long and cumbersome. How about:
module Stream where
class Stream s where close :: s -> IO () setBuffering :: s -> BufferMode -> IO () :
and so on. Importing qualified gives you names like
Stream.close, Stream.setBuffering,...
which are quite similar to your suggested ones. I suspect a typical use would have lots of stream operations in a few modules, so having short (unqualified) names might be nice.
-kzm -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
----------------------------------------------------------------- Seth Kurtzberg CTO ISEC Research and Network Operations Center 480-314-1540 888-879-5206 seth@isec.us -----------------------------------------------------------------