@@ -107,7 +107,13 @@ catchError caller h Handle__{..} err
107 else T.singleton '\r'
107 else T.singleton '\r'
108 | otherwise = E.throwIO (augmentIOError err caller h)
108 | otherwise = E.throwIO (augmentIOError err caller h)
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.
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.
111hGetChunk :: Handle -> IO Text
117hGetChunk :: Handle -> IO Text
112hGetChunk h = wantReadableHandle "hGetChunk" h readSingleChunk
118hGetChunk h = wantReadableHandle "hGetChunk" h readSingleChunk