[commit: ghc] master: Simplify CPP logic as we now need v7.10 for bootstrapping (a62701f)

git at git.haskell.org git at git.haskell.org
Fri Jan 13 17:14:54 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a62701f26e191d2e21c543e702ff1f3c795033c7/ghc

>---------------------------------------------------------------

commit a62701f26e191d2e21c543e702ff1f3c795033c7
Author: Gabor Greif <ggreif at gmail.com>
Date:   Thu Jan 12 17:44:38 2017 +0100

    Simplify CPP logic as we now need v7.10 for bootstrapping


>---------------------------------------------------------------

a62701f26e191d2e21c543e702ff1f3c795033c7
 compiler/ghci/Linker.hs      | 6 +-----
 compiler/main/DynFlags.hs    | 7 +------
 compiler/main/StaticFlags.hs | 7 +------
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index 6a0483c..b50edca 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -62,11 +62,7 @@ import System.Directory
 
 import Exception
 
-#if __GLASGOW_HASKELL__ >= 709
-import Foreign
-#else
-import Foreign.Safe
-#endif
+import Foreign (Ptr) -- needed for 2nd stage
 
 {- **********************************************************************
 
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 8d50e01..c8f6e1e 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -214,12 +214,7 @@ import qualified Data.IntSet as IntSet
 import GHC.Foreign (withCString, peekCString)
 import qualified GHC.LanguageExtensions as LangExt
 
-#if __GLASGOW_HASKELL__ >= 709
-import Foreign
-#else
-import Foreign.Safe
-#endif
-
+import Foreign (Ptr) -- needed for 2nd stage
 
 -- Note [Updating flag description in the User's Guide]
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index af8f4e6..b5be9ba 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -48,12 +48,7 @@ import Control.Monad
 import Data.IORef
 import System.IO.Unsafe ( unsafePerformIO )
 
-#if __GLASGOW_HASKELL__ >= 709
-import Foreign
-#else
-import Foreign.Safe
-#endif
-
+import Foreign (Ptr) -- needed for 2nd stage
 
 -----------------------------------------------------------------------------
 -- Static flags



More information about the ghc-commits mailing list