@@ -38,7 +38,7 @@ module Data.Text.IO
3838 ) where
3939
4040import Data.Text (Text)
41−import Prelude hiding (appendFile, catch, getContents, getLine, interact,
41+import Prelude hiding (appendFile, getContents, getLine, interact,
4242 putStr, putStrLn, readFile, writeFile)
4343import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
4444 withFile)
@@ -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, throwIO)
49+import qualified Control.Exception as E
5050import Control.Monad (liftM2, when)
5151import Data.IORef (readIORef, writeIORef)
5252import qualified Data.Text as T
@@ -123,10 +123,10 @@ hGetContents h = do
123123 return $ if isEmptyBuffer buf
124124 then T.empty
125125 else T.singleton '\r'
126− | otherwise = throwIO (augmentIOError e "hGetContents" h)
126+ | otherwise = E.throwIO (augmentIOError e "hGetContents" h)
127127 readChunks = do
128128 buf <- readIORef haCharBuffer
129− t <- readChunk hh buf `catch` catchError
129+ t <- readChunk hh buf `E.catch` catchError
130130 if T.null t
131131 then return [t]
132132 else (t:) `fmap` readChunks
@@ -144,10 +144,10 @@ chooseGoodBuffering h = do
144144 bufMode <- hGetBuffering h
145145 case bufMode of
146146 BlockBuffering Nothing -> do
147− d <- catch (liftM2 (-) (hFileSize h) (hTell h)) $ \(e::IOException) ->
147+ d <- E.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 throwIO e
150+ else E.throwIO e
151151 when (d > 0) . hSetBuffering h . BlockBuffering . Just . fromIntegral $ d
152152 _ -> return ()
153153#endif