@@ -46,7 +46,7 @@ import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
4646import qualified Data.ByteString.Char8 as B
4747import Data.Text.Encoding (decodeUtf8, encodeUtf8)
4848#else
49−import Control.Exception (catch, throw)
49+import Control.Exception (catch, throwIO)
5050import Control.Monad (liftM2, when)
5151import Data.IORef (readIORef, writeIORef)
5252import qualified Data.Text as T
@@ -123,7 +123,7 @@ hGetContents h = do
123123 return $ if isEmptyBuffer buf
124124 then T.empty
125125 else T.singleton '\r'
126− | otherwise = throw (augmentIOError e "hGetContents" h)
126+ | otherwise = throwIO (augmentIOError e "hGetContents" h)
127127 readChunks = do
128128 buf <- readIORef haCharBuffer
129129 t <- readChunk hh buf `catch` catchError
@@ -147,7 +147,7 @@ chooseGoodBuffering h = do
147147 d <- catch (liftM2 (-) (hFileSize h) (hTell h)) $ \(e::IOException) ->
148148 if ioe_type e == InappropriateType
149149 then return 16384 -- faster than the 2KB default
150− else throw e
150+ else throwIO e
151151 when (d > 0) . hSetBuffering h . BlockBuffering . Just . fromIntegral $ d
152152 _ -> return ()
153153#endif