summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-06-01 18:04:27 -0700
committerDavid Terei <davidterei@gmail.com>2011-06-17 20:40:33 -0700
commit097a33f7eae35f8e9a70c4a6a6431ce17f3cc861 (patch)
treec87a1c1d565fc65eaab9a350402d03e557de12d0 /compiler
parentce673b2bb62a74d055adc0ae05747b7b163eecd2 (diff)
downloadhaskell-097a33f7eae35f8e9a70c4a6a6431ce17f3cc861.tar.gz
SafeHaskell: Fix validation errors when Safe base used.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/iface/TcIface.lhs-boot2
-rw-r--r--compiler/utils/FastString.lhs5
-rw-r--r--compiler/utils/GhcIO.hs6
-rw-r--r--compiler/utils/StringBuffer.lhs9
4 files changed, 17 insertions, 5 deletions
diff --git a/compiler/iface/TcIface.lhs-boot b/compiler/iface/TcIface.lhs-boot
index d78253e034..a9684a6a91 100644
--- a/compiler/iface/TcIface.lhs-boot
+++ b/compiler/iface/TcIface.lhs-boot
@@ -7,7 +7,7 @@ import TcRnTypes ( IfL )
import InstEnv ( Instance )
import FamInstEnv ( FamInst )
import CoreSyn ( CoreRule )
-import HscTypes ( TypeEnv, VectInfo, IfaceVectInfo, IfaceTrustInfo )
+import HscTypes ( TypeEnv, VectInfo, IfaceVectInfo )
import Module ( Module )
import Annotations ( Annotation )
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 062d32d15e..89ab75815c 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -108,7 +108,12 @@ import Data.Char ( ord )
import GhcIO ( IO(..) )
+#if __GLASGOW_HASKELL__ >= 701
+import GHC.Ptr.Unsafe ( Ptr(..) )
+#else
import GHC.Ptr ( Ptr(..) )
+#endif
+
#if defined(__GLASGOW_HASKELL__)
import GHC.Base ( unpackCString# )
#endif
diff --git a/compiler/utils/GhcIO.hs b/compiler/utils/GhcIO.hs
index 9d6734ef20..82869c2da0 100644
--- a/compiler/utils/GhcIO.hs
+++ b/compiler/utils/GhcIO.hs
@@ -1,6 +1,10 @@
+
-- | A simple version compatability wrapper around GHC.IO.
+--
-- This module exports both the safe and Unsafe version of GHC.IO
--- after that SafeHaskell change over occured.
+-- taking care of the SafeHaskell changeover which spit up the
+-- old GHC.IO module.
+--
module GhcIO (
#if __GLASGOW_HASKELL__ >= 701
module GHC.IO.Unsafe,
diff --git a/compiler/utils/StringBuffer.lhs b/compiler/utils/StringBuffer.lhs
index 1ad4879ef8..326cb1c3f9 100644
--- a/compiler/utils/StringBuffer.lhs
+++ b/compiler/utils/StringBuffer.lhs
@@ -48,14 +48,17 @@ import FastString hiding ( buf )
import FastTypes
import FastFunctions
-import Foreign
import System.IO ( hGetBuf, hFileSize,IOMode(ReadMode), hClose
- , Handle, hTell )
+ , Handle, hTell, openBinaryFile )
import System.IO.Unsafe ( unsafePerformIO )
import GHC.Exts
-import System.IO ( openBinaryFile )
+#if __GLASGOW_HASKELL__ >= 701
+import Foreign
+#else
+import Foreign hiding ( unsafePerformIO )
+#endif
-- -----------------------------------------------------------------------------
-- The StringBuffer type