@@ -102,9 +102,9 @@ hGetContents h = do
102 (hh',ts) <- readChunks
102 (hh',ts) <- readChunks
103 return (hh', t:ts)
103 return (hh', t:ts)
104 readChunks `catch` \e -> do
104 readChunks `catch` \e -> do
105− (hh', _) <- hClose_help hh
106 if isEOFError e
105 if isEOFError e
107+ (hh', _) <- hClose_help hh
108 buf <- readIORef haCharBuffer
108 buf <- readIORef haCharBuffer
109 return $ if isEmptyBuffer buf
109 return $ if isEmptyBuffer buf
110 then (hh', [])
110 then (hh', [])