[commit: ghc] master: Fix the __GLASGOW_HASKELL__ comparison (97826e3)

git at git.haskell.org git at git.haskell.org
Thu Aug 30 13:35:19 UTC 2018


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

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

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

commit 97826e343c482f1c2fb7c74fbbe6958682608ac7
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date:   Thu Aug 30 15:34:39 2018 +0200

    Fix the __GLASGOW_HASKELL__ comparison
    
    Summary:
    GHC 8.4 corresponds to 804, not 840.
    
    Found by Gabor Greif.
    
    Test Plan: Harbormaster
    
    Reviewers: ggreif, bgamari, mpickering
    
    Reviewed By: ggreif
    
    Subscribers: rwbarton, carter
    
    Differential Revision: https://phabricator.haskell.org/D5064


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

97826e343c482f1c2fb7c74fbbe6958682608ac7
 compiler/iface/MkIface.hs | 5 ++---
 compiler/main/Plugins.hs  | 4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index 7469c4e..59a396e 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -119,11 +119,10 @@ import Data.IORef
 import System.Directory
 import System.FilePath
 import Plugins ( PluginRecompile(..), Plugin(..), LoadedPlugin(..))
-#if __GLASGOW_HASKELL__ < 840
+
 --Qualified import so we can define a Semigroup instance
 -- but it doesn't clash with Outputable.<>
 import qualified Data.Semigroup
-#endif
 
 {-
 ************************************************************************
@@ -1113,7 +1112,7 @@ instance Semigroup RecompileRequired where
 
 instance Monoid RecompileRequired where
   mempty = UpToDate
-#if __GLASGOW_HASKELL__ < 840
+#if __GLASGOW_HASKELL__ < 804
   mappend = (Data.Semigroup.<>)
 #endif
 
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs
index 8ead643..e83ec08 100644
--- a/compiler/main/Plugins.hs
+++ b/compiler/main/Plugins.hs
@@ -23,11 +23,9 @@ import Fingerprint
 import Data.List
 import Outputable (Outputable(..), text, (<+>))
 
-#if __GLASGOW_HASKELL__ < 840
 --Qualified import so we can define a Semigroup instance
 -- but it doesn't clash with Outputable.<>
 import qualified Data.Semigroup
-#endif
 
 import Control.Monad
 
@@ -125,7 +123,7 @@ instance Semigroup PluginRecompile where
 
 instance Monoid PluginRecompile where
   mempty = NoForceRecompile
-#if __GLASGOW_HASKELL__ < 840
+#if __GLASGOW_HASKELL__ < 804
   mappend = (Data.Semigroup.<>)
 #endif
 



More information about the ghc-commits mailing list