[commit: packages/deepseq] wip/remove_ghc70_72_cpp: Drop support and CPP for GHC 7.0 & GHC 7.2 (4148a11)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:59:40 UTC 2017


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

On branch  : wip/remove_ghc70_72_cpp
Link       : http://git.haskell.org/packages/deepseq.git/commitdiff/4148a11bb470ffe8005b203a2aa40cf087dec210

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

commit 4148a11bb470ffe8005b203a2aa40cf087dec210
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Apr 16 01:30:34 2017 +0200

    Drop support and CPP for GHC 7.0 & GHC 7.2


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

4148a11bb470ffe8005b203a2aa40cf087dec210
 .travis.yml        | 26 ++++----------------------
 Control/DeepSeq.hs | 24 ++++--------------------
 changelog.md       |  1 +
 deepseq.cabal      | 43 ++++++++++++++++++++-----------------------
 4 files changed, 29 insertions(+), 65 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bdcaaaf..31ade0e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,24 +13,6 @@ before_cache:
 
 matrix:
   include:
-    - env: CABALVER=1.24 GHCVER=7.0.1
-      compiler: ": #GHC 7.0.1"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.0.1], sources: [hvr-ghc]}}
-    - env: CABALVER=1.24 GHCVER=7.0.2
-      compiler: ": #GHC 7.0.2"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.0.2], sources: [hvr-ghc]}}
-    - env: CABALVER=1.24 GHCVER=7.0.3
-      compiler: ": #GHC 7.0.3"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.0.3], sources: [hvr-ghc]}}
-    - env: CABALVER=1.24 GHCVER=7.0.4
-      compiler: ": #GHC 7.0.4"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.0.4], sources: [hvr-ghc]}}
-    - env: CABALVER=1.24 GHCVER=7.2.1
-      compiler: ": #GHC 7.2.1"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.2.1], sources: [hvr-ghc]}}
-    - env: CABALVER=1.24 GHCVER=7.2.2
-      compiler: ": #GHC 7.2.2"
-      addons: {apt: {packages: [cabal-install-1.24,ghc-7.2.2], sources: [hvr-ghc]}}
     - env: CABALVER=1.24 GHCVER=7.4.1
       compiler: ": #GHC 7.4.1"
       addons: {apt: {packages: [cabal-install-1.24,ghc-7.4.1], sources: [hvr-ghc]}}
@@ -73,14 +55,14 @@ matrix:
     - env: CABALVER=1.24 GHCVER=8.0.2
       compiler: ": #GHC 8.0.2"
       addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
+    - env: CABALVER=2.0 GHCVER=8.2.1
+      compiler: ": #GHC 8.2.1"
+      addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1], sources: [hvr-ghc]}}
 
 before_install:
  - unset CC
  - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- - if [ "$GHCVER" != "7.2.1" ];
-   then
-     export TEST_OPTS="--enable-tests --enable-benchmarks";
-   fi
+ - export TEST_OPTS="--enable-tests --enable-benchmarks";
 
 install:
  - cabal --version
diff --git a/Control/DeepSeq.hs b/Control/DeepSeq.hs
index 4c5505e..093056b 100644
--- a/Control/DeepSeq.hs
+++ b/Control/DeepSeq.hs
@@ -1,22 +1,21 @@
 {-# LANGUAGE BangPatterns #-}
 {-# LANGUAGE CPP #-}
-#if __GLASGOW_HASKELL__ >= 702
 {-# LANGUAGE DefaultSignatures #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE TypeOperators #-}
-# if MIN_VERSION_array(0,4,0)
 {-# LANGUAGE Safe #-}
-# endif
-#endif
+{-# LANGUAGE TypeOperators #-}
+
 #if __GLASGOW_HASKELL__ >= 706
 {-# LANGUAGE PolyKinds #-}
 #endif
+
 #if __GLASGOW_HASKELL__ >= 708
 {-# LANGUAGE EmptyCase #-}
 #endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.DeepSeq
@@ -116,7 +115,6 @@ import GHC.Stack ( CallStack(..) )
 import GHC.SrcLoc ( SrcLoc(..) )
 #endif
 
-#if __GLASGOW_HASKELL__ >= 702
 import GHC.Fingerprint.Type ( Fingerprint(..) )
 import GHC.Generics
 
@@ -166,7 +164,6 @@ instance NFData1 f => GNFData One (Rec1 f) where
 
 instance (NFData1 f, GNFData One g) => GNFData One (f :.: g) where
     grnf args = liftRnf (grnf args) . unComp1
-#endif
 
 infixr 0 $!!
 
@@ -325,11 +322,8 @@ class NFData a where
     --
     rnf :: a -> ()
 
-#if __GLASGOW_HASKELL__ >= 702
     default rnf :: (Generic a, GNFData Zero (Rep a)) => a -> ()
     rnf = grnf RnfArgs0 . from
-#endif
-
 
 -- | A class of functors that can be fully evaluated.
 --
@@ -342,10 +336,8 @@ class NFData1 f where
     -- See 'rnf' for the generic deriving.
     liftRnf :: (a -> ()) -> f a -> ()
 
-#if __GLASGOW_HASKELL__ >= 702
     default liftRnf :: (Generic1 f, GNFData One (Rep1 f)) => (a -> ()) -> f a -> ()
     liftRnf r = grnf (RnfArgs1 r) . from1
-#endif
 
 -- |@since 1.4.3.0
 rnf1 :: (NFData1 f, NFData a) => f a -> ()
@@ -460,11 +452,7 @@ instance (Integral a, NFData a) => NFData (Ratio a) where
 #endif
   rnf x = rnf (numerator x, denominator x)
 
-#if MIN_VERSION_base(4,4,0)
 instance (NFData a) => NFData (Complex a) where
-#else
-instance (RealFloat a, NFData a) => NFData (Complex a) where
-#endif
   rnf (x:+y) = rnf x `seq`
                rnf y `seq`
                ()
@@ -641,11 +629,9 @@ instance NFData1 MVar where
 ----------------------------------------------------------------------------
 -- GHC Specifics
 
-#if __GLASGOW_HASKELL__ >= 702
 -- |@since 1.4.0.0
 instance NFData Fingerprint where
     rnf (Fingerprint _ _) = ()
-#endif
 
 ----------------------------------------------------------------------------
 -- Foreign.Ptr
@@ -730,13 +716,11 @@ instance NFData CClock where rnf = rwhnf
 -- |@since 1.4.0.0
 instance NFData CTime where rnf = rwhnf
 
-#if MIN_VERSION_base(4,4,0)
 -- |@since 1.4.0.0
 instance NFData CUSeconds where rnf = rwhnf
 
 -- |@since 1.4.0.0
 instance NFData CSUSeconds where rnf = rwhnf
-#endif
 
 -- |@since 1.4.0.0
 instance NFData CFloat where rnf = rwhnf
diff --git a/changelog.md b/changelog.md
index 8f95f22..3e71473 100644
--- a/changelog.md
+++ b/changelog.md
@@ -15,6 +15,7 @@
   * Add `NFData1` and `NFData2` type classes ([#8](https://github.com/haskell/deepseq/issues/8))
   * Add `NFData1` and `NFData` instances for `Data.Functor.{Compose,Sum,Product}`
     ([#30](https://github.com/haskell/deepseq/pull/30))
+  * Drop support for GHC 7.0 & GHC 7.2
 
 ## 1.4.2.0  *Apr 2016*
 
diff --git a/deepseq.cabal b/deepseq.cabal
index 1883377..d5945f4 100644
--- a/deepseq.cabal
+++ b/deepseq.cabal
@@ -22,12 +22,11 @@ description:
     data types.
 build-type:     Simple
 cabal-version:  >=1.10
-tested-with:    GHC==8.0.1,
+tested-with:    GHC==8.2.1, GHC==8.0.2, GHC==8.0.1,
                 GHC==7.10.3, GHC==7.10.2, GHC==7.10.1,
                 GHC==7.8.4, GHC==7.8.3, GHC==7.8.2, GHC==7.8.1,
                 GHC==7.6.3, GHC==7.6.2, GHC==7.6.1,
-                GHC==7.4.2, GHC==7.4.1, GHC==7.2.2, GHC==7.2.1,
-                GHC==7.0.4, GHC==7.0.3, GHC==7.0.2, GHC==7.0.1
+                GHC==7.4.2, GHC==7.4.1
 
 extra-source-files: changelog.md
 
@@ -41,30 +40,28 @@ library
     BangPatterns
     CPP
 
-  if impl(ghc>=7.2)
-    -- Enable Generics-backed DefaultSignatures for `rnf`
-    other-extensions:
-      DefaultSignatures
-      GADTs
-      FlexibleContexts
-      FlexibleInstances
-      MultiParamTypeClasses
-      Safe
-      TypeOperators
+  -- Enable Generics-backed DefaultSignatures for `rnf`
+  other-extensions:
+    DefaultSignatures
+    GADTs
+    FlexibleContexts
+    FlexibleInstances
+    MultiParamTypeClasses
+    Safe
+    TypeOperators
 
-    -- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4
-    if impl(ghc < 7.6)
-      build-depends: ghc-prim == 0.2.*
+  -- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4
+  if impl(ghc == 7.4.*)
+    build-depends: ghc-prim == 0.2.*
 
-  if impl(ghc>=7.8)
-    other-extensions:
-      EmptyCase
+  if impl(ghc>=7.6)
+    other-extensions: PolyKinds
 
-  if impl(ghc < 7.4)
-    build-depends: array < 0.4
+  if impl(ghc>=7.8)
+    other-extensions: EmptyCase
 
-  build-depends: base       >= 4.3 && < 4.11,
-                 array      >= 0.3 && < 0.6
+  build-depends: base       >= 4.5 && < 4.11,
+                 array      >= 0.4 && < 0.6
   ghc-options: -Wall
 
   exposed-modules: Control.DeepSeq



More information about the ghc-commits mailing list