[commit: packages/deepseq] master, typeable-with-kinds: Recover breakage for GHC<7.11 caused by de1bc89 (153520a)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 11:35:59 UTC 2015
Repository : ssh://git@git.haskell.org/deepseq
On branches: master,typeable-with-kinds
Link : http://git.haskell.org/packages/deepseq.git/commitdiff/153520ab033fd26beb47757cc6512f177cb1ae8f
>---------------------------------------------------------------
commit 153520ab033fd26beb47757cc6512f177cb1ae8f
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Thu Jan 15 13:16:41 2015 +0100
Recover breakage for GHC<7.11 caused by de1bc89
de1bc89 dropped a few redundant constraints, some of which are not yet
redundant in prior GHC/base versions.
>---------------------------------------------------------------
153520ab033fd26beb47757cc6512f177cb1ae8f
Control/DeepSeq.hs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Control/DeepSeq.hs b/Control/DeepSeq.hs
index 418b081..a732feb 100644
--- a/Control/DeepSeq.hs
+++ b/Control/DeepSeq.hs
@@ -284,7 +284,11 @@ 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)
instance (NFData a) => NFData (Complex a) where
@@ -316,7 +320,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)
More information about the ghc-commits
mailing list