[commit: packages/parallel] master: Restore compatibility with GHC < 7.11 (0ec7fe2)

git at git.haskell.org git at git.haskell.org
Sat Jan 2 08:16:45 UTC 2016


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

On branch  : master
Link       : http://git.haskell.org/packages/parallel.git/commitdiff/0ec7fe287db9b837af5baab2e9566ac9bef19625

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

commit 0ec7fe287db9b837af5baab2e9566ac9bef19625
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue Mar 10 08:27:34 2015 +0100

    Restore compatibility with GHC < 7.11
    
    This guards the changes in e4e4228ba94178cf31b97fe81b94bff3de6fce03 and
    dfb8fe517b10588847ca285f93300fa7f1552857 with CPP thereby fixing #6


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

0ec7fe287db9b837af5baab2e9566ac9bef19625
 Control/Seq.hs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Control/Seq.hs b/Control/Seq.hs
index 55fb7dd..13c5d0e 100644
--- a/Control/Seq.hs
+++ b/Control/Seq.hs
@@ -66,6 +66,9 @@ import Data.Foldable (Foldable, toList)
 #endif
 import Data.Map (Map)
 import qualified Data.Map (toList)
+#if __GLASGOW_HASKELL__ < 711
+import Data.Ix (Ix)
+#endif
 import Data.Array (Array)
 import qualified Data.Array (bounds, elems)
 
@@ -145,11 +148,19 @@ seqFoldable strat = seqList strat . toList
 
 -- | Evaluate the elements of an array according to the given strategy.
 -- Evaluation of the array bounds may be triggered as a side effect.
+#if __GLASGOW_HASKELL__ >= 711
 seqArray :: Strategy a -> Strategy (Array i a)
+#else
+seqArray :: Ix i => Strategy a -> Strategy (Array i a)
+#endif
 seqArray strat = seqList strat . Data.Array.elems
 
 -- | Evaluate the bounds of an array according to the given strategy.
+#if __GLASGOW_HASKELL__ >= 711
 seqArrayBounds :: Strategy i -> Strategy (Array i a)
+#else
+seqArrayBounds :: Ix i => Strategy i -> Strategy (Array i a)
+#endif
 seqArrayBounds strat = seqTuple2 strat strat . Data.Array.bounds
 
 -- | Evaluate the keys and values of a map according to the given strategies.



More information about the ghc-commits mailing list