From 81b217b104feb963e00537a51e6b3dfee8163b86 Mon Sep 17 00:00:00 2001 From: Ross Paterson Date: Thu, 9 Sep 2010 12:55:21 +0000 Subject: [PATCH] avoid Foreign.unsafePerformIO --- GHC/Conc/Sync.lhs | 2 +- GHC/IO/Encoding/Iconv.hs | 3 ++- GHC/IO/Handle/Internals.hs | 2 +- System/CPUTime.hsc | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs index 24178a0..cc16853 100644 --- a/GHC/Conc/Sync.lhs +++ b/GHC/Conc/Sync.lhs @@ -75,7 +75,7 @@ module GHC.Conc.Sync , sharedCAF ) where -import Foreign +import Foreign hiding (unsafePerformIO) import Foreign.C #ifdef mingw32_HOST_OS diff --git a/GHC/IO/Encoding/Iconv.hs b/GHC/IO/Encoding/Iconv.hs index fd35fc6..9a9e8c8 100644 --- a/GHC/IO/Encoding/Iconv.hs +++ b/GHC/IO/Encoding/Iconv.hs @@ -30,7 +30,7 @@ module GHC.IO.Encoding.Iconv ( #if !defined(mingw32_HOST_OS) -import Foreign +import Foreign hiding (unsafePerformIO) import Foreign.C import Data.Maybe import GHC.Base @@ -39,6 +39,7 @@ import GHC.IO.Encoding.Types import GHC.Num import GHC.Show import GHC.Real +import System.IO.Unsafe (unsafePerformIO) import System.Posix.Internals c_DEBUG_DUMP :: Bool diff --git a/GHC/IO/Handle/Internals.hs b/GHC/IO/Handle/Internals.hs index 844c8c6..9271296 100644 --- a/GHC/IO/Handle/Internals.hs +++ b/GHC/IO/Handle/Internals.hs @@ -70,7 +70,7 @@ import GHC.MVar import Data.Typeable import Control.Monad import Data.Maybe -import Foreign +import Foreign hiding (unsafePerformIO) -- import System.IO.Error import System.Posix.Internals hiding (FD) diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc index c2faa1c..5a7e696 100644 --- a/System/CPUTime.hsc +++ b/System/CPUTime.hsc @@ -31,8 +31,9 @@ import CPUTime ( getCPUTime, cpuTimePrecision ) #endif #ifdef __GLASGOW_HASKELL__ -import Foreign +import Foreign hiding (unsafePerformIO) import Foreign.C +import System.IO.Unsafe (unsafePerformIO) #include "HsBaseConfig.h" -- 1.7.10.4