@@ -38,8 +38,8 @@ module Data.Text.Lazy.IO
40import Data.Text.Lazy (Text)
40import Data.Text.Lazy (Text)
41−import Prelude hiding (appendFile, getContents, getLine, interact, putStr,
41+import Prelude hiding (appendFile, catch, getContents, getLine, interact,
42− putStrLn, readFile, writeFile)
42+ putStr, putStrLn, readFile, writeFile)
43import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
43import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
45import qualified Data.Text.IO as T
45import qualified Data.Text.IO as T
@@ -49,7 +49,7 @@ import Data.Text.Lazy.Encoding (decodeUtf8)
49import qualified Data.ByteString.Char8 as S8
49import qualified Data.ByteString.Char8 as S8
50import qualified Data.ByteString.Lazy.Char8 as L8
50import qualified Data.ByteString.Lazy.Char8 as L8
52−import Control.Exception (throw)
52+import Control.Exception (catch, throwIO)
53import Control.Monad (when)
53import Control.Monad (when)
54import Data.IORef (readIORef)
54import Data.IORef (readIORef)
55import Data.Text.IO.Internal (hGetLineWith, readChunk)
55import Data.Text.IO.Internal (hGetLineWith, readChunk)
@@ -134,7 +134,7 @@ lazyReadBuffered h hh@Handle__{..} = do
134 then return $ if isEmptyBuffer buf
134 then return $ if isEmptyBuffer buf
135 then (hh', empty)
135 then (hh', empty)
136 else (hh', L.singleton '\r')
136 else (hh', L.singleton '\r')
137− else throw (augmentIOError e "hGetContents" h)
137+ else throwIO (augmentIOError e "hGetContents" h)
140-- | Read a single line from a handle.
140-- | Read a single line from a handle.