summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Paterson <ross@soi.city.ac.uk>2010-09-09 12:55:31 +0000
committerRoss Paterson <ross@soi.city.ac.uk>2010-09-09 12:55:31 +0000
commitf10947d79cdfac8f8b065ef51a10d9c9cf3c19bc (patch)
tree3daa088ca1d8fc97e8d16be4e0c5ab6f9ea27d4a
parentb94d8b0b32b5164dc0dfba5c30008982eeb94b5b (diff)
downloadhaskell-f10947d79cdfac8f8b065ef51a10d9c9cf3c19bc.tar.gz
avoid Foreign.unsafePerformIO
-rw-r--r--compiler/ghci/ByteCodeFFI.lhs2
-rw-r--r--compiler/ghci/RtClosureInspect.hs4
-rw-r--r--compiler/main/InteractiveEval.hs3
-rw-r--r--compiler/utils/FastString.lhs2
4 files changed, 6 insertions, 5 deletions
diff --git a/compiler/ghci/ByteCodeFFI.lhs b/compiler/ghci/ByteCodeFFI.lhs
index 0f149c38ab..1589fe1bed 100644
--- a/compiler/ghci/ByteCodeFFI.lhs
+++ b/compiler/ghci/ByteCodeFFI.lhs
@@ -9,7 +9,7 @@ module ByteCodeFFI ( moan64 ) where
import Outputable
import System.IO
-import Foreign
+import System.IO.Unsafe
moan64 :: String -> SDoc -> a
moan64 msg pp_rep
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index e39a0bc7e3..a23d355ecf 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -75,8 +75,8 @@ import Data.List
import qualified Data.Sequence as Seq
import Data.Monoid
import Data.Sequence (viewl, ViewL(..))
-import Foreign
--- import System.IO.Unsafe
+import Foreign hiding (unsafePerformIO)
+import System.IO.Unsafe
---------------------------------------------
-- * A representation of semi evaluated Terms
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index 3f932dcbbf..13267bd118 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -78,7 +78,7 @@ import System.Directory
import Data.Dynamic
import Data.List (find, partition)
import Control.Monad
-import Foreign
+import Foreign hiding (unsafePerformIO)
import Foreign.C
import GHC.Exts
import Data.Array
@@ -87,6 +87,7 @@ import Control.Concurrent
import Data.List (sortBy)
-- import Foreign.StablePtr
import System.IO
+import System.IO.Unsafe
-- -----------------------------------------------------------------------------
-- running a statement interactively
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 8fcd419a2a..a357f9853f 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -95,7 +95,7 @@ import FastFunctions
import Panic
import Util
-import Foreign
+import Foreign hiding ( unsafePerformIO )
import Foreign.C
import GHC.Exts
import System.IO