Commits (6)
env:
- GHCVER=7.0.1 CABALVER=1.16
- GHCVER=7.0.2 CABALVER=1.16
- GHCVER=7.0.3 CABALVER=1.16
- GHCVER=7.0.4 CABALVER=1.16
- GHCVER=7.2.1 CABALVER=1.16
- GHCVER=7.2.2 CABALVER=1.16
- GHCVER=7.4.1 CABALVER=1.16
- GHCVER=7.4.2 CABALVER=1.16
- GHCVER=7.6.1 CABALVER=1.16
- GHCVER=7.6.2 CABALVER=1.16
- GHCVER=7.6.3 CABALVER=1.16
- GHCVER=7.8.1 CABALVER=1.18
- GHCVER=7.8.2 CABALVER=1.18
- GHCVER=7.8.3 CABALVER=1.18
- GHCVER=head CABALVER=head
- CABALVER=1.16 GHCVER=7.0.1
- CABALVER=1.16 GHCVER=7.0.2
- CABALVER=1.16 GHCVER=7.0.3
- CABALVER=1.16 GHCVER=7.0.4
- CABALVER=1.16 GHCVER=7.2.1
- CABALVER=1.16 GHCVER=7.2.2
- CABALVER=1.16 GHCVER=7.4.1
- CABALVER=1.16 GHCVER=7.4.2
- CABALVER=1.16 GHCVER=7.6.1
- CABALVER=1.16 GHCVER=7.6.2
- CABALVER=1.16 GHCVER=7.6.3
- CABALVER=1.18 GHCVER=7.8.1
- CABALVER=1.18 GHCVER=7.8.2
- CABALVER=1.18 GHCVER=7.8.3
- CABALVER=1.18 GHCVER=7.8.4
- CABALVER=1.22 GHCVER=7.10.1
- CABALVER=head GHCVER=head
matrix:
allow_failures:
- env: GHCVER=head CABALVER=head
- env: CABALVER=head GHCVER=head
before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
......
......@@ -81,8 +81,7 @@ import Data.Proxy ( Proxy(Proxy) )
#if MIN_VERSION_base(4,8,0)
import Data.Functor.Identity ( Identity(..) )
-- NB: Data.Typeable.Internal is "Trustworthy" only starting w/ base-4.8
import Data.Typeable.Internal ( TypeRep(..), TyCon(..) )
import Data.Typeable ( TypeRep, TyCon, rnfTypeRep, rnfTyCon )
import Data.Void ( Void, absurd )
import Numeric.Natural ( Natural )
#endif
......@@ -284,10 +283,18 @@ instance NFData (a -> b) where rnf !_ = ()
--Rational and complex numbers.
#if __GLASGOW_HASKELL__ >= 711
instance NFData a => NFData (Ratio a) where
#else
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`
()
......@@ -316,7 +323,11 @@ instance NFData a => NFData (ZipList a) where
instance NFData a => NFData (Const a b) where
rnf = rnf . getConst
#if __GLASGOW_HASKELL__ >= 711
instance (NFData a, NFData b) => NFData (Array a b) where
#else
instance (Ix a, NFData a, NFData b) => NFData (Array a b) where
#endif
rnf x = rnf (bounds x, Data.Array.elems x)
#if MIN_VERSION_base(4,6,0)
......@@ -368,13 +379,13 @@ instance NFData Unique where
--
-- /Since: 1.4.0.0/
instance NFData TypeRep where
rnf (TypeRep _ tycon tyrep) = rnf tycon `seq` rnf tyrep
rnf tyrep = rnfTypeRep tyrep
-- | __NOTE__: Only defined for @base-4.8.0.0@ and later
--
-- /Since: 1.4.0.0/
instance NFData TyCon where
rnf (TyCon _ tcp tcm tcn) = rnf tcp `seq` rnf tcm `seq` rnf tcn
rnf tycon = rnfTyCon tycon
#endif
----------------------------------------------------------------------------
......
# Changelog for [`deepseq` package](http://hackage.haskell.org/package/deepseq)
## 1.4.1.0 *TBA*
* Drop redundant constraints from a few `NFData` instances (if
possible for a given `base` version)
## 1.4.0.0 *Dec 2014*
* Bundled with GHC 7.10.1
......
name: deepseq
version: 1.4.0.0
version: 1.4.1.0
-- NOTE: Don't forget to update ./changelog.md
license: BSD3
license-file: LICENSE
......