diff -Nru haskell-parallel-3.2.0.6/changelog.md haskell-parallel-3.2.1.0/changelog.md --- haskell-parallel-3.2.0.6/changelog.md 2014-12-28 10:13:46.000000000 +0000 +++ haskell-parallel-3.2.1.0/changelog.md 2016-01-02 08:11:16.000000000 +0000 @@ -1,5 +1,13 @@ # Changelog for [`parallel` package](http://hackage.haskell.org/package/parallel) +## 3.2.1.0 *Jan 2016* + + - Support `base-4.9.0.0` + - Add `{-# NOINLINE[1] rseq #-}` to make the `RULE` more robust + - Fix broken links to papers in Haddock + - Make `rpar` type signature consistent with `rseq` via type-synonym + - Drop redundant `Ix`-constraint on `seqArray`/`seqArrayBounds` for GHC >= 8.0 + ## 3.2.0.6 *Dec 2014* - Make `-Wall` message free for all supported `base` versions diff -Nru haskell-parallel-3.2.0.6/Control/Parallel/Strategies.hs haskell-parallel-3.2.1.0/Control/Parallel/Strategies.hs --- haskell-parallel-3.2.0.6/Control/Parallel/Strategies.hs 2014-12-28 10:13:46.000000000 +0000 +++ haskell-parallel-3.2.1.0/Control/Parallel/Strategies.hs 2016-01-02 08:11:16.000000000 +0000 @@ -201,8 +201,15 @@ runEval :: Eval a -> a runEval (Eval x) = case x realWorld# of (# _, a #) -> a +instance Functor Eval where + fmap = liftM + +instance Applicative Eval where + pure x = Eval $ \s -> (# s, x #) + (<*>) = ap + instance Monad Eval where - return x = Eval $ \s -> (# s, x #) + return = pure Eval x >>= k = Eval $ \s -> case x s of (# s', a #) -> case k a of Eval f -> f s' @@ -214,8 +221,15 @@ runEval :: Eval a -> a runEval (Done x) = x +instance Functor Eval where + fmap = liftM + +instance Applicative Eval where + pure = Done + (<*>) = ap + instance Monad Eval where - return x = Done x + return = pure Done x >>= k = lazy (k x) -- Note: pattern 'Done x' makes '>>=' strict {-# RULES "lazy Done" forall x . lazy (Done x) = Done x #-} @@ -223,14 +237,6 @@ #endif -instance Functor Eval where - fmap = liftM - -instance Applicative Eval where - (<*>) = ap - pure = return - - -- The Eval monad satisfies the monad laws. -- -- (1) Left identity: @@ -323,7 +329,7 @@ evalSeq :: SeqStrategy a -> Strategy a evalSeq strat x = strat x `pseq` return x --- | a name for @Control.Seq.Strategy@, for documetnation only. +-- | A name for @Control.Seq.Strategy@, for documentation only. type SeqStrategy a = Control.Seq.Strategy a -- -------------------------------------------------------------------------- @@ -380,7 +386,7 @@ -- == rdeepseq -- | 'rpar' sparks its argument (for evaluation in parallel). -rpar :: a -> Eval a +rpar :: Strategy a #if __GLASGOW_HASKELL__ >= 702 rpar x = Eval $ \s -> spark# x s #else @@ -509,6 +515,7 @@ -- more compositional counterpart; use RULES to do the specialisation. {-# NOINLINE [1] parList #-} +{-# NOINLINE [1] rseq #-} {-# RULES "parList/rseq" parList rseq = parListWHNF #-} @@ -794,7 +801,7 @@ parallelism in GHC, we discovered that the original formulation of Strategies had some problems, in particular it lead to space leaks and difficulties expressing speculative parallelism. Details are in -the paper /Runtime Support for Multicore Haskell/ . +the paper /Runtime Support for Multicore Haskell/ . This module has been rewritten in version 2. The main change is to the 'Strategy a' type synonym, which was previously @a -> Done@ and @@ -853,7 +860,7 @@ presented in the paper /Seq no More: Better Strategies for Parallel Haskell/ - + The major differenes in the API are: diff -Nru haskell-parallel-3.2.0.6/Control/Seq.hs haskell-parallel-3.2.1.0/Control/Seq.hs --- haskell-parallel-3.2.0.6/Control/Seq.hs 2014-12-28 10:13:46.000000000 +0000 +++ haskell-parallel-3.2.1.0/Control/Seq.hs 2016-01-02 08:11:16.000000000 +0000 @@ -66,7 +66,9 @@ #endif import Data.Map (Map) import qualified Data.Map (toList) +#if !((__GLASGOW_HASKELL__ >= 711) && MIN_VERSION_array(0,5,1)) import Data.Ix (Ix) +#endif import Data.Array (Array) import qualified Data.Array (bounds, elems) @@ -146,11 +148,19 @@ -- | 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) && MIN_VERSION_array(0,5,1) +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) && MIN_VERSION_array(0,5,1) +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. diff -Nru haskell-parallel-3.2.0.6/debian/changelog haskell-parallel-3.2.1.0/debian/changelog --- haskell-parallel-3.2.0.6/debian/changelog 2015-12-03 20:16:47.000000000 +0000 +++ haskell-parallel-3.2.1.0/debian/changelog 2016-01-11 03:01:43.000000000 +0000 @@ -1,3 +1,9 @@ +haskell-parallel (3.2.1.0-1) unstable; urgency=medium + + * New upstream release + + -- Clint Adams Sun, 10 Jan 2016 22:01:43 -0500 + haskell-parallel (3.2.0.6-4) unstable; urgency=medium * Switch Vcs-Git/Vcs-Browser headers to new location. diff -Nru haskell-parallel-3.2.0.6/parallel.cabal haskell-parallel-3.2.1.0/parallel.cabal --- haskell-parallel-3.2.0.6/parallel.cabal 2014-12-28 10:13:46.000000000 +0000 +++ haskell-parallel-3.2.1.0/parallel.cabal 2016-01-02 08:11:16.000000000 +0000 @@ -1,5 +1,5 @@ name: parallel -version: 3.2.0.6 +version: 3.2.1.0 -- NOTE: Don't forget to update ./changelog.md license: BSD3 license-file: LICENSE @@ -9,7 +9,7 @@ category: Control, Parallelism build-type: Simple cabal-version: >=1.10 -tested-with: 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 +tested-with: GHC==8.0.1, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4 description: This package provides a library for parallel programming. @@ -24,7 +24,6 @@ other-extensions: BangPatterns CPP - FlexibleInstances MagicHash UnboxedTuples @@ -35,7 +34,7 @@ build-depends: array >= 0.3 && < 0.6, - base >= 4.3 && < 4.9, + base >= 4.3 && < 4.10, containers >= 0.4 && < 0.6, deepseq >= 1.1 && < 1.5