> > perhaps be in terms of IOUArray of Word8, or at least [Word8] rather
> > than String. Using IOUArray of Word8 would let you avoid the
> > inefficiency of lists if you're just shoving data around.
>
> I don't use this interface myself, my work was just prompted by
> G.Russel's problem which I tried tracking down. I don't know
> how many users would be affected by API breakage, so maybe a different
> representation should mean a new function and maybe a transition
> roadmap...Could this be simply deprecated in favour of hGetArray (or
> a wrapper for Strings on top of that)?
API breakage isn't something we should worry about for System.Posix.
The old posix library will continue to offer the old interface, at least
for one major release. We should take the opportunity of the move over
to the hierarchical structure to fix problems with the API too.
I've already made several updates to bring it up to the latest revision
of POSIX, for example (admittedly most of these didn't break the API).
hGetArray/hPutArray are slightly different in that they work on Handles.
fdRead/fdWrite are lower level, and will be faster since they don't have
the extra layer of buffering.
So, I propose:
fdRead :: Fd -> ByteCount -> IOUArray Int Word8 -> IO ByteCount
fdWrite :: Fd -> ByteCount -> IOUArray Int Word8 -> IO ()
Hmm, perhaps the array index type should be ByteCount rather than Int.
Cheers,
Simon
_______________________________________________
Cvs-libraries mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-libraries