Skip to content

Commit 454a517

Browse files
committed
Remove outdated CPP
1 parent fa61053 commit 454a517

File tree

8 files changed

+0
-33
lines changed

8 files changed

+0
-33
lines changed

bench/Main.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ main :: IO ()
2929
main = defaultMain
3030
[ bgroup "micro" micros ]
3131

32-
#if !(MIN_VERSION_deepseq(1,4,2))
33-
instance NFData (IORef a) where
34-
rnf x = seq x ()
35-
#endif
36-
3732
instance NFData (TVar a) where
3833
rnf x = seq x ()
3934

src/Control/Monad/ReaderIO.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ module Control.Monad.ReaderIO
99
where
1010

1111
import Control.Monad.Fix
12-
#if MIN_VERSION_base(4,10,0)
1312
import Control.Applicative
14-
#endif
1513
import Control.Monad
1614
import Control.Monad.Reader.Class
1715
import Control.Monad.IO.Class
@@ -34,10 +32,8 @@ instance Applicative (ReaderIO e) where
3432
{-# INLINE pure #-}
3533
(<*>) = ap
3634
{-# INLINE (<*>) #-}
37-
#if MIN_VERSION_base(4,10,0)
3835
liftA2 = liftM2
3936
{-# INLINE liftA2 #-}
40-
#endif
4137

4238
instance Monad (ReaderIO e) where
4339
ReaderIO q >>= f = ReaderIO $ \e -> q e >>= \a -> runReaderIO (f a) e

src/Data/AppendMap.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ import Prelude hiding (null)
2525
import Data.Coerce
2626
import Data.Default
2727
import Data.Map (Map)
28-
#if MIN_VERSION_containers(0,5,11)
2928
import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)
30-
#else
31-
import qualified Data.Map as Map (showTree, showTreeWith)
32-
#endif
3329

3430
import Data.Map.Monoidal
3531

src/Reflex/Dynamic/TH.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,13 @@ mkDynExp s = case Hs.parseExpWithMode Hs.defaultParseMode { Hs.extensions = [ Hs
9090
Hs.ParseFailed (Hs.SrcLoc _ l c) err -> fail $ "mkDyn:" <> show l <> ":" <> show c <> ": " <> err
9191
Hs.ParseOk e -> qDynPure $ return $ everywhere (id `extT` reinstateUnqDyn) $ Hs.toExp $ everywhere (id `extT` antiE) e
9292
where TH.Name (TH.OccName occName) (TH.NameG _ _ (TH.ModName modName)) = 'unqMarker
93-
#if MIN_VERSION_haskell_src_exts(1,18,0)
9493
antiE :: Hs.Exp Hs.SrcSpanInfo -> Hs.Exp Hs.SrcSpanInfo
9594
antiE x = case x of
9695
Hs.SpliceExp l se ->
9796
Hs.App l (Hs.Var l $ Hs.Qual l (Hs.ModuleName l modName) (Hs.Ident l occName)) $ case se of
9897
Hs.IdSplice l2 v -> Hs.Var l2 $ Hs.UnQual l2 $ Hs.Ident l2 v
9998
Hs.ParenSplice _ ps -> ps
10099
_ -> x
101-
#else
102-
antiE x = case x of
103-
Hs.SpliceExp se ->
104-
Hs.App (Hs.Var $ Hs.Qual (Hs.ModuleName modName) (Hs.Ident occName)) $ case se of
105-
Hs.IdSplice v -> Hs.Var $ Hs.UnQual $ Hs.Ident v
106-
Hs.ParenSplice ps -> ps
107-
_ -> x
108-
#endif
109100
reinstateUnqDyn (TH.Name (TH.OccName occName') (TH.NameQ (TH.ModName modName')))
110101
| modName == modName' && occName == occName' = 'unqMarker
111102
reinstateUnqDyn x = x

src/Reflex/FunctorMaybe.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{-# LANGUAGE CPP #-}
2-
#if MIN_VERSION_base(4,9,0)
32
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
43
{-# LANGUAGE StandaloneDeriving #-}
5-
#endif
64

75
-- |
86
-- Module:

src/Reflex/Optimizer.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ import CoreMonad
2121
import Data.String
2222
import GhcPlugins
2323

24-
#if MIN_VERSION_base(4,9,0)
2524
import Prelude hiding ((<>))
26-
#endif
2725

2826
#endif
2927

src/Reflex/Requester/Base/Internal.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ data RequesterState t (request :: Type -> Type) = RequesterState
272272
-- | A basic implementation of 'Requester'.
273273
newtype RequesterT t request (response :: Type -> Type) m a = RequesterT { unRequesterT :: StateT (RequesterState t request) (ReaderT (EventSelectorInt t Any) m) a }
274274
deriving (Functor, Applicative, Monad, MonadFix, MonadIO, MonadException
275-
-- MonadAsyncException can't be derived on ghc-8.0.1; we use base-4.9.1 as a proxy for ghc-8.0.2
276-
#if MIN_VERSION_base(4,9,1)
277275
, MonadAsyncException
278-
#endif
279276
, MonadCatch
280277
, MonadThrow
281278
, MonadMask

src/Reflex/Spider/Internal.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
-- a graph traversal algorithm to propagate 'Event's and 'Behavior's.
3030
module Reflex.Spider.Internal (module Reflex.Spider.Internal) where
3131

32-
#if MIN_VERSION_base(4,10,0)
3332
import Control.Applicative (liftA2)
34-
#endif
3533
import Control.Concurrent
3634
import Control.Exception
3735
import Control.Monad hiding (forM, forM_, mapM, mapM_)
@@ -2577,9 +2575,7 @@ mapDynamicSpider f = SpiderDynamic . newMapDyn f . unSpiderDynamic
25772575

25782576
instance HasSpiderTimeline x => Applicative (Reflex.Class.Dynamic (SpiderTimeline x)) where
25792577
pure = SpiderDynamic . dynamicConst
2580-
#if MIN_VERSION_base(4,10,0)
25812578
liftA2 f a b = SpiderDynamic $ Reflex.Spider.Internal.zipDynWith f (unSpiderDynamic a) (unSpiderDynamic b)
2582-
#endif
25832579
SpiderDynamic a <*> SpiderDynamic b = SpiderDynamic $ Reflex.Spider.Internal.zipDynWith ($) a b
25842580
a *> b = R.unsafeBuildDynamic (R.sample $ R.current b) $ R.leftmost [R.updated b, R.tag (R.current b) $ R.updated a]
25852581
(<*) = flip (*>) -- There are no effects, so order doesn't matter

0 commit comments

Comments
 (0)