summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-06-14 14:04:11 -0700
committerDavid Terei <davidterei@gmail.com>2011-06-17 20:40:34 -0700
commit1d704e17caef8156a3d4c4b764737ede85884eb8 (patch)
treefdc5c2b7023d16b4aa111739c314be37c5de8e45 /compiler/utils
parent90bab6b82256b5dc0562e46a091b4dcfce18f804 (diff)
downloadhaskell-1d704e17caef8156a3d4c4b764737ede85884eb8.tar.gz
SafeHaskell: Make base GHC.* modules untrusted
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Binary.hs2
-rw-r--r--compiler/utils/Encoding.hs6
-rw-r--r--compiler/utils/FastFunctions.lhs2
-rw-r--r--compiler/utils/FastMutInt.lhs5
-rw-r--r--compiler/utils/FastString.lhs5
-rw-r--r--compiler/utils/GhcIO.hs24
-rw-r--r--compiler/utils/Pretty.lhs6
7 files changed, 6 insertions, 44 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 80e9171aa4..c5a2c8f4fd 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -82,7 +82,7 @@ import GHC.Real ( Ratio(..) )
import GHC.Exts
import GHC.Word ( Word8(..) )
-import GhcIO ( IO(..) )
+import GHC.IO ( IO(..) )
type BinArray = ForeignPtr Word8
diff --git a/compiler/utils/Encoding.hs b/compiler/utils/Encoding.hs
index 4351538702..6467377a1a 100644
--- a/compiler/utils/Encoding.hs
+++ b/compiler/utils/Encoding.hs
@@ -32,11 +32,7 @@ module Encoding (
import Foreign
import Data.Char
import Numeric
-#if __GLASGOW_HASKELL__ >= 701
-import GHC.Ptr.Unsafe ( Ptr(..) )
-#else
-import GHC.Ptr ( Ptr(..) )
-#endif
+import GHC.Ptr ( Ptr(..) )
import GHC.Base
-- -----------------------------------------------------------------------------
diff --git a/compiler/utils/FastFunctions.lhs b/compiler/utils/FastFunctions.lhs
index 0734240287..b1dacdcd9b 100644
--- a/compiler/utils/FastFunctions.lhs
+++ b/compiler/utils/FastFunctions.lhs
@@ -24,7 +24,7 @@ import GHC.Exts
import GHC.Word
import GHC.Base (unsafeChr)
-import GhcIO (IO(..), unsafeDupableInterleaveIO)
+import GHC.IO (IO(..), unsafeDupableInterleaveIO)
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs
index 3a18a13501..26183071f1 100644
--- a/compiler/utils/FastMutInt.lhs
+++ b/compiler/utils/FastMutInt.lhs
@@ -26,12 +26,7 @@ module FastMutInt(
#endif
import GHC.Base
-#if __GLASGOW_HASKELL__ >= 701
-import GHC.Ptr.Safe
-import GHC.Ptr.Unsafe
-#else
import GHC.Ptr
-#endif
#else /* ! __GLASGOW_HASKELL__ */
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index b1449edae2..35d4387dd3 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -105,14 +105,13 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
import Data.Maybe ( isJust )
import Data.Char ( ord )
-import GhcIO ( IO(..) )
+import GHC.IO ( IO(..) )
+import GHC.Ptr ( Ptr(..) )
#if __GLASGOW_HASKELL__ >= 701
import Foreign.Safe
-import GHC.Ptr.Unsafe ( Ptr(..) )
#else
import Foreign hiding ( unsafePerformIO )
-import GHC.Ptr ( Ptr(..) )
#endif
#if defined(__GLASGOW_HASKELL__)
diff --git a/compiler/utils/GhcIO.hs b/compiler/utils/GhcIO.hs
deleted file mode 100644
index 17198de071..0000000000
--- a/compiler/utils/GhcIO.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-
--- | A simple version compatability wrapper around GHC.IO.
---
--- This module exports both the safe and Unsafe version of GHC.IO
--- taking care of the SafeHaskell changeover which spit up the
--- old GHC.IO module.
---
-module GhcIO (
-#if __GLASGOW_HASKELL__ >= 701
- module GHC.IO.Safe,
- module GHC.IO.Unsafe
-#else
- module GHC.IO
-#endif
- ) where
-
-#if __GLASGOW_HASKELL__ >= 701
-import GHC.IO.Safe
-import GHC.IO.Unsafe
-#else
-import GHC.IO
-#endif
-
-
diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs
index 7b2702d471..0493daabee 100644
--- a/compiler/utils/Pretty.lhs
+++ b/compiler/utils/Pretty.lhs
@@ -193,11 +193,7 @@ import System.IO
--for a RULES
import GHC.Base ( unpackCString# )
import GHC.Exts ( Int# )
-#if __GLASGOW_HASKELL__ >= 701
-import GHC.Ptr.Unsafe ( Ptr(..) )
-#else
-import GHC.Ptr ( Ptr(..) )
-#endif
+import GHC.Ptr ( Ptr(..) )
#endif
-- Don't import Util( assertPanic ) because it makes a loop in the module structure