summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-11-29 17:53:56 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-11-29 17:54:04 +0100
commit589721318f0f545de33e306d0358bfc2ea738237 (patch)
tree490b5c36466a3db09f1c9acc38b51be474fdbbeb
parent616acebaba08b260d35a6f81cfe315c28f17bd51 (diff)
downloadhaskell-589721318f0f545de33e306d0358bfc2ea738237.tar.gz
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
-rw-r--r--libraries/base/Text/ParserCombinators/ReadP.hs7
-rw-r--r--libraries/base/Text/ParserCombinators/ReadPrec.hs5
2 files changed, 0 insertions, 12 deletions
diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs
index 3908b24408..7bdb97cebd 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 a1ce920ce2..136b8aed00 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