Hello, Simon! On Mon, Aug 23, 2010 at 8:00 AM, Simon Marlow <marlo...@gmail.com> wrote: > The issue is that hGet always waits for a complete buffer-full of data > before returning. The hWaitForInput/hGetNonBlocking combination fixes that > problem, but you have to be careful to make sure that the Handle is in > binary mode, otherwise hWaitForInput will not behave the way you expect (it > will decode the input byte stream, and wait for a full character). For more > information, see > > http://hackage.haskell.org/trac/ghc/ticket/3808 > > A better fix is to use hGetBufSome, but (a) it is only available in GHC 6.14 > which isn't released yet, and (b) there isn't a bytestring wrapper for it > yet.
So there really is a problem in the documentation of hGetBuf. I assume it got fixed in HEAD together with hGetBufSome. Cheers! =) -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe