Skip to content
Browse files

ghc 7.5 removed catch from Prelude

  • Loading branch information...
1 parent 6e29fac commit 986cba2a837a82ffb41b5e6d93c1239ae92029e4 @markwright markwright committed Jun 28, 2012
Showing with 17 additions and 3 deletions.
  1. +5 −1 Data/Text/IO.hs
  2. +2 −0 Data/Text/IO/Internal.hs
  3. +5 −1 Data/Text/Lazy/IO.hs
  4. +5 −1 tests/tests/src/Data/Text/Tests/Properties.hs
View
6 Data/Text/IO.hs
@@ -38,7 +38,11 @@ module Data.Text.IO
) where
import Data.Text (Text)
-import Prelude hiding (appendFile, catch, getContents, getLine, interact,
+import Prelude hiding (appendFile,
+#if !MIN_VERSION_base(4,6,0)
+ catch,
+#endif
+ getContents, getLine, interact,
putStr, putStrLn, readFile, writeFile)
import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
withFile)
View
2 Data/Text/IO/Internal.hs
@@ -32,7 +32,9 @@ import GHC.IO.Buffer (Buffer(..), CharBuffer, RawCharBuffer, bufferAdjustL,
withRawBuffer, writeCharBuf)
import GHC.IO.Handle.Internals (ioe_EOF, readTextDevice, wantReadableHandle_)
import GHC.IO.Handle.Types (Handle__(..), Newline(..))
+#if !MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)
+#endif
import System.IO (Handle)
import System.IO.Error (isEOFError)
import qualified Data.Text as T
View
6 Data/Text/Lazy/IO.hs
@@ -38,7 +38,11 @@ module Data.Text.Lazy.IO
) where
import Data.Text.Lazy (Text)
-import Prelude hiding (appendFile, catch, getContents, getLine, interact,
+import Prelude hiding (appendFile,
+#if !MIN_VERSION_base(4,6,0)
+ catch,
+#endif
+ getContents, getLine, interact,
putStr, putStrLn, readFile, writeFile)
import System.IO (Handle, IOMode(..), hPutChar, openFile, stdin, stdout,
withFile)
View
6 tests/tests/src/Data/Text/Tests/Properties.hs
@@ -26,7 +26,11 @@ import Data.Text.Read as T
import Data.Text.Search (indices)
import Data.Word (Word8, Word16, Word32)
import Numeric (showHex)
-import Prelude hiding (catch, replicate)
+import Prelude hiding (
+#if !MIN_VERSION_base(4,6,0)
+ catch,
+#endif
+ replicate)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import qualified Data.Bits as Bits (shiftL, shiftR)

0 comments on commit 986cba2

Please sign in to comment.
Something went wrong with that request. Please try again.