summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/basicTypes/UniqSupply.lhs4
-rw-r--r--compiler/ghci/ByteCodeAsm.lhs7
-rw-r--r--compiler/ghci/RtClosureInspect.hs7
-rw-r--r--compiler/main/BreakArray.hs6
-rw-r--r--compiler/prelude/PrelNames.lhs21
-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
9 files changed, 62 insertions, 17 deletions
diff --git a/compiler/basicTypes/UniqSupply.lhs b/compiler/basicTypes/UniqSupply.lhs
index cb1a1fc69f..9a5e80358f 100644
--- a/compiler/basicTypes/UniqSupply.lhs
+++ b/compiler/basicTypes/UniqSupply.lhs
@@ -31,7 +31,11 @@ import FastTypes
import MonadUtils
import Control.Monad
import Control.Monad.Fix
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO (unsafeDupableInterleaveIO)
+#else
import GHC.IOBase (unsafeDupableInterleaveIO)
+#endif
\end{code}
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs
index 66a15004f9..4d360e1ffe 100644
--- a/compiler/ghci/ByteCodeAsm.lhs
+++ b/compiler/ghci/ByteCodeAsm.lhs
@@ -46,9 +46,14 @@ import Data.Int ( Int64 )
import Data.Char ( ord )
import GHC.Base ( ByteArray#, MutableByteArray#, RealWorld )
-import GHC.IOBase ( IO(..) )
import GHC.Ptr ( Ptr(..) )
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
+
-- -----------------------------------------------------------------------------
-- Unlinked BCOs
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index 4996fdb2b3..f90b1ca03c 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -60,7 +60,12 @@ import Constants ( wORD_SIZE )
import GHC.Arr ( Array(..) )
import GHC.Exts
-import GHC.IOBase ( IO(IO) )
+
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
import Control.Monad
import Data.Maybe
diff --git a/compiler/main/BreakArray.hs b/compiler/main/BreakArray.hs
index ceae28db39..f7154c1089 100644
--- a/compiler/main/BreakArray.hs
+++ b/compiler/main/BreakArray.hs
@@ -26,7 +26,11 @@ module BreakArray
) where
#ifdef GHCI
import GHC.Exts
-import GHC.IOBase
+#if __GLASGOW_HASKELL__ >= 611
+import GHC.IO ( IO(..) )
+#else
+import GHC.IOBase ( IO(..) )
+#endif
import GHC.Word
import Constants
diff --git a/compiler/prelude/PrelNames.lhs b/compiler/prelude/PrelNames.lhs
index 513d81b475..4e18f5dd2b 100644
--- a/compiler/prelude/PrelNames.lhs
+++ b/compiler/prelude/PrelNames.lhs
@@ -237,7 +237,7 @@ pRELUDE = mkBaseModule_ pRELUDE_NAME
gHC_PRIM, gHC_TYPES, gHC_BOOL, gHC_UNIT, gHC_ORDERING, gHC_GENERICS, gHC_CLASSES, gHC_BASE, gHC_ENUM,
gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER, gHC_INTEGER_INTERNALS, gHC_LIST, gHC_PARR,
gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING, dATA_FOLDABLE, dATA_TRAVERSABLE,
- gHC_PACK, gHC_CONC, gHC_IO_BASE,
+ gHC_PACK, gHC_CONC, gHC_IO, gHC_IO_Exception,
gHC_ST, gHC_ARR, gHC_STABLE, gHC_ADDR, gHC_PTR, gHC_ERR, gHC_REAL,
gHC_FLOAT, gHC_TOP_HANDLER, sYSTEM_IO, dYNAMIC, tYPEABLE, gENERICS,
dOTNET, rEAD_PREC, lEX, gHC_INT, gHC_WORD, mONAD, mONAD_FIX, aRROW, cONTROL_APPLICATIVE,
@@ -266,7 +266,8 @@ dATA_FOLDABLE = mkBaseModule (fsLit "Data.Foldable")
dATA_TRAVERSABLE= mkBaseModule (fsLit "Data.Traversable")
gHC_PACK = mkBaseModule (fsLit "GHC.Pack")
gHC_CONC = mkBaseModule (fsLit "GHC.Conc")
-gHC_IO_BASE = mkBaseModule (fsLit "GHC.IOBase")
+gHC_IO = mkBaseModule (fsLit "GHC.IO")
+gHC_IO_Exception = mkBaseModule (fsLit "GHC.IO.Exception")
gHC_ST = mkBaseModule (fsLit "GHC.ST")
gHC_ARR = mkBaseModule (fsLit "GHC.Arr")
gHC_STABLE = mkBaseModule (fsLit "GHC.Stable")
@@ -689,7 +690,7 @@ dataClassName = clsQual gENERICS (fsLit "Data") dataClassKey
-- Error module
assertErrorName :: Name
-assertErrorName = varQual gHC_IO_BASE (fsLit "assertError") assertErrorIdKey
+assertErrorName = varQual gHC_IO_Exception (fsLit "assertError") assertErrorIdKey
-- Enum module (Enum, Bounded)
enumClassName, enumFromName, enumFromToName, enumFromThenName,
@@ -735,15 +736,15 @@ toPName = varQual gHC_PARR (fsLit "toP") toPIdKey
emptyPName = varQual gHC_PARR (fsLit "emptyP") emptyPIdKey
appPName = varQual gHC_PARR (fsLit "+:+") appPIdKey
--- IOBase things
+-- IO things
ioTyConName, ioDataConName, thenIOName, bindIOName, returnIOName,
failIOName :: Name
-ioTyConName = tcQual gHC_IO_BASE (fsLit "IO") ioTyConKey
-ioDataConName = conName gHC_IO_BASE (fsLit "IO") ioDataConKey
-thenIOName = varQual gHC_IO_BASE (fsLit "thenIO") thenIOIdKey
-bindIOName = varQual gHC_IO_BASE (fsLit "bindIO") bindIOIdKey
-returnIOName = varQual gHC_IO_BASE (fsLit "returnIO") returnIOIdKey
-failIOName = varQual gHC_IO_BASE (fsLit "failIO") failIOIdKey
+ioTyConName = tcQual gHC_IO (fsLit "IO") ioTyConKey
+ioDataConName = conName gHC_IO (fsLit "IO") ioDataConKey
+thenIOName = varQual gHC_IO (fsLit "thenIO") thenIOIdKey
+bindIOName = varQual gHC_IO (fsLit "bindIO") bindIOIdKey
+returnIOName = varQual gHC_IO (fsLit "returnIO") returnIOIdKey
+failIOName = varQual gHC_IO (fsLit "failIO") failIOIdKey
-- IO things
printName :: Name
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# )