Skip to content

Commit

Permalink
Remove outdated CPP
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfmpe committed Jan 16, 2025
1 parent fa61053 commit 454a517
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 33 deletions.
5 changes: 0 additions & 5 deletions bench/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ main :: IO ()
main = defaultMain
[ bgroup "micro" micros ]

#if !(MIN_VERSION_deepseq(1,4,2))
instance NFData (IORef a) where
rnf x = seq x ()
#endif

instance NFData (TVar a) where
rnf x = seq x ()

Expand Down
4 changes: 0 additions & 4 deletions src/Control/Monad/ReaderIO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ module Control.Monad.ReaderIO
where

import Control.Monad.Fix
#if MIN_VERSION_base(4,10,0)
import Control.Applicative

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on macos-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on macos-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on macos-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on macos-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on ubuntu-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on macos-latest

The import of ‘Control.Applicative’ is redundant

Check warning on line 12 in src/Control/Monad/ReaderIO.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on macos-latest

The import of ‘Control.Applicative’ is redundant
#endif
import Control.Monad
import Control.Monad.Reader.Class
import Control.Monad.IO.Class
Expand All @@ -34,10 +32,8 @@ instance Applicative (ReaderIO e) where
{-# INLINE pure #-}
(<*>) = ap
{-# INLINE (<*>) #-}
#if MIN_VERSION_base(4,10,0)
liftA2 = liftM2
{-# INLINE liftA2 #-}
#endif

instance Monad (ReaderIO e) where
ReaderIO q >>= f = ReaderIO $ \e -> q e >>= \a -> runReaderIO (f a) e
Expand Down
4 changes: 0 additions & 4 deletions src/Data/AppendMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ import Prelude hiding (null)
import Data.Coerce
import Data.Default
import Data.Map (Map)
#if MIN_VERSION_containers(0,5,11)
import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)
#else
import qualified Data.Map as Map (showTree, showTreeWith)
#endif

import Data.Map.Monoidal

Expand Down
9 changes: 0 additions & 9 deletions src/Reflex/Dynamic/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,13 @@ mkDynExp s = case Hs.parseExpWithMode Hs.defaultParseMode { Hs.extensions = [ Hs
Hs.ParseFailed (Hs.SrcLoc _ l c) err -> fail $ "mkDyn:" <> show l <> ":" <> show c <> ": " <> err
Hs.ParseOk e -> qDynPure $ return $ everywhere (id `extT` reinstateUnqDyn) $ Hs.toExp $ everywhere (id `extT` antiE) e
where TH.Name (TH.OccName occName) (TH.NameG _ _ (TH.ModName modName)) = 'unqMarker

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 92 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on macos-latest

Pattern match(es) are non-exhaustive
#if MIN_VERSION_haskell_src_exts(1,18,0)
antiE :: Hs.Exp Hs.SrcSpanInfo -> Hs.Exp Hs.SrcSpanInfo
antiE x = case x of
Hs.SpliceExp l se ->
Hs.App l (Hs.Var l $ Hs.Qual l (Hs.ModuleName l modName) (Hs.Ident l occName)) $ case se of

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.4.4 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.4.4 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8.4 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8.4 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10.7 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10.7 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0.2 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0.2 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 96 in src/Reflex/Dynamic/TH.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on macos-latest

Pattern match(es) are non-exhaustive
Hs.IdSplice l2 v -> Hs.Var l2 $ Hs.UnQual l2 $ Hs.Ident l2 v
Hs.ParenSplice _ ps -> ps
_ -> x
#else
antiE x = case x of
Hs.SpliceExp se ->
Hs.App (Hs.Var $ Hs.Qual (Hs.ModuleName modName) (Hs.Ident occName)) $ case se of
Hs.IdSplice v -> Hs.Var $ Hs.UnQual $ Hs.Ident v
Hs.ParenSplice ps -> ps
_ -> x
#endif
reinstateUnqDyn (TH.Name (TH.OccName occName') (TH.NameQ (TH.ModName modName')))
| modName == modName' && occName == occName' = 'unqMarker
reinstateUnqDyn x = x
2 changes: 0 additions & 2 deletions src/Reflex/FunctorMaybe.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# LANGUAGE CPP #-}
#if MIN_VERSION_base(4,9,0)
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif

-- |
-- Module:
Expand Down
2 changes: 0 additions & 2 deletions src/Reflex/Optimizer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import CoreMonad
import Data.String
import GhcPlugins

#if MIN_VERSION_base(4,9,0)
import Prelude hiding ((<>))
#endif

#endif

Expand Down
3 changes: 0 additions & 3 deletions src/Reflex/Requester/Base/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ data RequesterState t (request :: Type -> Type) = RequesterState
-- | A basic implementation of 'Requester'.
newtype RequesterT t request (response :: Type -> Type) m a = RequesterT { unRequesterT :: StateT (RequesterState t request) (ReaderT (EventSelectorInt t Any) m) a }
deriving (Functor, Applicative, Monad, MonadFix, MonadIO, MonadException
-- MonadAsyncException can't be derived on ghc-8.0.1; we use base-4.9.1 as a proxy for ghc-8.0.2
#if MIN_VERSION_base(4,9,1)
, MonadAsyncException
#endif
, MonadCatch
, MonadThrow
, MonadMask
Expand Down
4 changes: 0 additions & 4 deletions src/Reflex/Spider/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
-- a graph traversal algorithm to propagate 'Event's and 'Behavior's.
module Reflex.Spider.Internal (module Reflex.Spider.Internal) where

#if MIN_VERSION_base(4,10,0)
import Control.Applicative (liftA2)
#endif
import Control.Concurrent
import Control.Exception
import Control.Monad hiding (forM, forM_, mapM, mapM_)
Expand Down Expand Up @@ -2577,9 +2575,7 @@ mapDynamicSpider f = SpiderDynamic . newMapDyn f . unSpiderDynamic

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

0 comments on commit 454a517

Please sign in to comment.