on master help sign in
Fix documentation for hGetChunk
commit24fd53e675d0685996031d7a4bc0f0cb139a8211 authorBryan O'Sullivan <bos@serpentine.com> dateSat 8 Sep 2012, 23:08 (14 years ago) parentbe28fb7
1 file changed+7−1
Data/Text/IO.hs+7−1
Data/Text/IO.hs+7−1
@@ -107,7 +107,13 @@ catchError caller h Handle__{..} err
107107 else T.singleton '\r'
108108 | otherwise = E.throwIO (augmentIOError err caller h)
109109
110−-- | Read a single chunk of strict text from a 'Handle'.
110+-- | /Experimental./ Read a single chunk of strict text from a
111+-- 'Handle'. The size of the chunk depends on the amount of input
112+-- currently buffered.
113+--
114+-- This function blocks only if there is no data available, and EOF
115+-- has not yet been reached. Once EOF is reached, this function
116+-- returns an empty string instead of throwing an exception.
111117hGetChunk :: Handle -> IO Text
112118hGetChunk h = wantReadableHandle "hGetChunk" h readSingleChunk
113119 where