From: Ross Paterson Date: Thu, 9 Sep 2010 12:55:31 +0000 (+0000) Subject: avoid Foreign.unsafePerformIO X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=f10947d79cdfac8f8b065ef51a10d9c9cf3c19bc avoid Foreign.unsafePerformIO --- diff --git a/compiler/ghci/ByteCodeFFI.lhs b/compiler/ghci/ByteCodeFFI.lhs index 0f149c3..1589fe1 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 e39a0bc..a23d355 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 3f932dc..13267bd 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 8fcd419..a357f98 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