> The impl for this kind of stuff is already in there:
>
> hFillBufBA :: Handle -> ByteArray Int -> Int -> IO Int
> hPutBufBA :: Handle -> ByteArray Int -> Int -> IO ()
>
> hFillBuf :: Handle -> Addr -> Int -> IO Int
> hPutBuf:: Handle -> Addr -> Int -> IO ()
>
> all available fr
Hello!
On Fri, Mar 10, 2000 at 01:42:01AM -0800, Simon Marlow wrote:
> [...]
> > hPutBufBA :: Handle -> ByteArray Int -> Int -> IO ()
> > hPutBuf:: Handle -> Addr -> Int -> IO ()
> [...]
Why are the output functions of return type IO () and not also
IO Int (or rather IO [some integral
> On Fri, Mar 10, 2000 at 01:42:01AM -0800, Simon Marlow wrote:
> > [...]
> > > hPutBufBA :: Handle -> ByteArray Int -> Int -> IO ()
>
> > > hPutBuf:: Handle -> Addr -> Int -> IO ()
> > [...]
>
> Why are the output functions of return type IO () and not also
> IO Int (or rather IO [som
Hello!
On Fri, Mar 10, 2000 at 02:52:41AM -0800, Simon Marlow wrote:
> [...]
> The idea is that the functions never return until the whole buffer is
> written. If the reading end (of a socket or pipe) is closed prematurely,
> we'll get an IO error.
But even in the IO error, it'd be interestin