summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-29 13:18:22 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-29 13:18:22 +0000
commit1c83695b5b9ae3175c18908c1d58aeadb1f225ae (patch)
tree31d3073656ae76ac32d0a4819c9bbfc6bd82ecd6 /compiler/utils
parent2675f2b68794ef6712e1ea0b9ec110c46c9e5ebf (diff)
downloadhaskell-1c83695b5b9ae3175c18908c1d58aeadb1f225ae.tar.gz
Changes for the new IO library, mainly base-package modules moving around
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Binary.hs7
-rw-r--r--compiler/utils/FastFunctions.lhs13
-rw-r--r--compiler/utils/FastMutInt.lhs7
-rw-r--r--compiler/utils/FastString.lhs7
4 files changed, 30 insertions, 4 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index c61f8a6baa..cbfec74cff 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -83,10 +83,15 @@ import System.IO.Unsafe ( unsafeInterleaveIO )
import System.IO.Error ( mkIOError, eofErrorType )
import GHC.Real ( Ratio(..) )
import GHC.Exts
-import GHC.IOBase ( IO(..) )
import GHC.Word ( Word8(..) )
import System.IO ( openBinaryFile )
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
type BinArray = ForeignPtr Word8
---------------------------------------------------------------
diff --git a/compiler/utils/FastFunctions.lhs b/compiler/utils/FastFunctions.lhs
index 86c89bd9c7..d6a282fcbe 100644
--- a/compiler/utils/FastFunctions.lhs
+++ b/compiler/utils/FastFunctions.lhs
@@ -22,8 +22,19 @@ import System.IO.Unsafe
import GHC.Exts
import GHC.Word
-import GHC.IOBase (IO(..))
+
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO (unsafeDupableInterleaveIO)
+#else
import GHC.IOBase (unsafeDupableInterleaveIO)
+#endif
+
import GHC.Base (unsafeChr)
-- Just like unsafePerformIO, but we inline it.
diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs
index c29b568426..dfa188ed2a 100644
--- a/compiler/utils/FastMutInt.lhs
+++ b/compiler/utils/FastMutInt.lhs
@@ -25,9 +25,14 @@ module FastMutInt(
#endif
import GHC.Base
-import GHC.IOBase
import GHC.Ptr
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
#else /* ! __GLASGOW_HASKELL__ */
import Data.IORef
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 62bc5d5edf..29c7788c2f 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -103,7 +103,12 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
import Data.Maybe ( isJust )
import Data.Char ( ord )
-import GHC.IOBase ( IO(..) )
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
import GHC.Ptr ( Ptr(..) )
#if defined(__GLASGOW_HASKELL__)
import GHC.Base ( unpackCString# )