[commit: ghc] master: Remove redundant `#if`s (5897213)

git at git.haskell.org git at git.haskell.org
Sun Nov 29 16:54:00 UTC 2015


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

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

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

commit 589721318f0f545de33e306d0358bfc2ea738237
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Nov 29 17:53:56 2015 +0100

    Remove redundant `#if`s
    
    `#if __GLASGOW_HASKELL__ > xxx` macros make little sense inside `base`
    currently.
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D1541


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

589721318f0f545de33e306d0358bfc2ea738237
 libraries/base/Text/ParserCombinators/ReadP.hs    | 7 -------
 libraries/base/Text/ParserCombinators/ReadPrec.hs | 5 -----
 2 files changed, 12 deletions(-)

diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs
index 3908b24..7bdb97c 100644
--- a/libraries/base/Text/ParserCombinators/ReadP.hs
+++ b/libraries/base/Text/ParserCombinators/ReadP.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE MagicHash #-}
 {-# LANGUAGE DeriveFunctor #-}
@@ -77,9 +76,7 @@ import GHC.Unicode ( isSpace )
 import GHC.List ( replicate, null )
 import GHC.Base hiding ( many )
 
-#if __GLASGOW_HASKELL__ > 710
 import Control.Monad.Fail
-#endif
 
 infixr 5 +++, <++
 
@@ -124,10 +121,8 @@ instance Monad P where
 
   fail _ = Fail
 
-#if __GLASGOW_HASKELL__ > 710
 instance MonadFail P where
   fail _ = Fail
-#endif
 
 instance Alternative P where
   empty = Fail
@@ -176,10 +171,8 @@ instance Monad ReadP where
   fail _    = R (\_ -> Fail)
   R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k))
 
-#if __GLASGOW_HASKELL__ > 710
 instance MonadFail ReadP where
   fail _    = R (\_ -> Fail)
-#endif
 
 instance Alternative ReadP where
     empty = mzero
diff --git a/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs
index a1ce920..136b8ae 100644
--- a/libraries/base/Text/ParserCombinators/ReadPrec.hs
+++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE CPP #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -65,9 +64,7 @@ import qualified Text.ParserCombinators.ReadP as ReadP
 import GHC.Num( Num(..) )
 import GHC.Base
 
-#if __GLASGOW_HASKELL__ > 710
 import qualified Control.Monad.Fail as MonadFail
-#endif
 
 -- ---------------------------------------------------------------------------
 -- The readPrec type
@@ -87,10 +84,8 @@ instance Monad ReadPrec where
   fail s    = P (\_ -> fail s)
   P f >>= k = P (\n -> do a <- f n; let P f' = k a in f' n)
 
-#if __GLASGOW_HASKELL__ > 710
 instance MonadFail.MonadFail ReadPrec where
   fail s    = P (\_ -> fail s)
-#endif
 
 instance MonadPlus ReadPrec where
   mzero = pfail



More information about the ghc-commits mailing list