@@ -38,8 +38,8 @@ module Data.Text.Lazy.IO
3838 ) where
3939
4040import Data.Text.Lazy (Text)
41−import Prelude hiding (appendFile, getContents, getLine, interact, putStr,
42− putStrLn, readFile, writeFile)
41+import Prelude hiding (appendFile, catch, getContents, getLine, interact,
42+ putStr, putStrLn, readFile, writeFile)
4343import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
4444 withFile)
4545import qualified Data.Text.IO as T
@@ -49,7 +49,7 @@ import Data.Text.Lazy.Encoding (decodeUtf8)
4949import qualified Data.ByteString.Char8 as S8
5050import qualified Data.ByteString.Lazy.Char8 as L8
5151#else
52−import Control.Exception (throw)
52+import Control.Exception (catch, throwIO)
5353import Control.Monad (when)
5454import Data.IORef (readIORef)
5555import Data.Text.IO.Internal (hGetLineWith, readChunk)
@@ -134,7 +134,7 @@ lazyReadBuffered h hh@Handle__{..} = do
134134 then return $ if isEmptyBuffer buf
135135 then (hh', empty)
136136 else (hh', L.singleton '\r')
137− else throw (augmentIOError e "hGetContents" h)
137+ else throwIO (augmentIOError e "hGetContents" h)
138138#endif
139139
140140-- | Read a single line from a handle.