getting a Binary module into the standard libs
Hal Daume III
Mon, 11 Nov 2002 09:06:04 -0800 (PST)
> > There's a concern that if you only write, say, 2 of the last 8 bits,
> > this won't actually get written unless you call flushByte. I don't know
> > how this was handled in the NHC version; perhaps just require the user
> > to call flushByte at the end if they're worried about such behavior?
> The final-byte flush should be automatic when the BinHandle is closed.
The GHC version lacks a close function. Presumably this is the 'closeBin'
function which is commented out in the export list. All this would need
to do is call flushByte, assuming we don't allow AppendMode? Though if we
force them to call flushByte at the end, instead of some otherly-named
function, presumably they could use AppendMode as long as they realize
that they need to flushBytes at the end of any write. I don't
particularly care...I don't find appending binary files to be very useful.