packages feed

parallel 2.0.0.0 → 2.1.0.0

raw patch · 2 files changed

+12/−166 lines, 2 filesdep ~deepseq

Dependency ranges changed: deepseq

Files

Control/Parallel/Strategies.hs view
@@ -70,8 +70,8 @@ --     and there are transformation rules that automatically translate --     e.g. @parList rwnhf@ into a call to the optimised version. -----   * 'NFData' is deprecated; please use the @DeepSeq@ class in the @deepseq@---     package instead.  Note that since the 'Strategy' type changed, 'rnf'+--   * 'NFData' has been moved to @Control.DeepSeq@ in the @deepseq@+--     package.  Note that since the 'Strategy' type changed, 'rnf' --     is no longer a 'Strategy': use 'rdeepseq' instead.  -----------------------------------------------------------------------------@@ -103,8 +103,11 @@     -- * Building strategies     Eval(..), unEval, +    -- * re-exported for backwards compatibility+    NFData(..), +     -- * Deprecated functionality-    NFData(..), Done, demanding, sparking, (>|), (>||), r0, +    Done, demanding, sparking, (>|), (>||), r0,    ) where  import Data.Traversable@@ -112,18 +115,6 @@ import Control.Parallel import Control.DeepSeq --- imports for deprecated APIs-import Data.Int-import Data.Word-import Data.Complex-import qualified Data.Map-import qualified Data.IntMap-import qualified Data.Set-import qualified Data.IntSet-import Data.Tree-import Data.Array-import GHC.Real- -- ----------------------------------------------------------------------------- -- Eval @@ -202,10 +193,10 @@  -- | A 'Strategy' that fully evaluates its argument -- --- > rdeepseq a = deepseq a `pseq` a+-- > rdeepseq a = rnf a `pseq` a ---rdeepseq :: DeepSeq a => Strategy a-rdeepseq a = deepseq a `pseq` a+rdeepseq :: NFData a => Strategy a+rdeepseq a = rnf a `pseq` a  -- ----------------------------------------------------------------------------- -- Tuples@@ -382,7 +373,7 @@ -- ----------------------------------------------------------------------------- -- Old/deprecated stuff -{-# DEPRECATED Done "The Strategies type is now a -> a, not a -> Done" #-}+{-# DEPRECATED Done "The Strategy type is now a -> a, not a -> Done" #-} type Done = ()  {-# DEPRECATED demanding "Use pseq or $| instead" #-}@@ -404,148 +395,3 @@ {-# DEPRECATED r0 "Strategies must return a result, there is no r0 any more" #-} r0 :: a -> () r0 _ = ()--{-# DEPRECATED NFData "Use DeepSeq from deepseq:Control.DeepSeq instead" #-}-{-# DEPRECATED rnf "Use rdeepseq instead" #-}-class NFData a where-  -- | Reduces its argument to (head) normal form.-  rnf :: a -> ()-  -- Default method. Useful for base types. A specific method is necessay for-  -- constructed types-  rnf a = a `seq` ()--{-# DEPRECATED NFDataIntegral "Use DeepSeqIntegral from deepseq:Control.DeepSeq instead" #-}-{-# DEPRECATED NFDataOrd "Use DeepSeqOrd from deepseq:Control.DeepSeq instead" #-}-class (NFData a, Integral a) => NFDataIntegral a-class (NFData a, Ord a) => NFDataOrd a--instance (NFData a, NFData b) => NFData (a,b) where-  rnf (x,y) = rnf x `seq` rnf y--instance (NFData a, NFData b, NFData c) => NFData (a,b,c) where-  rnf (x,y,z) = rnf x `seq` rnf y `seq` rnf z --instance (NFData a, NFData b, NFData c, NFData d) => NFData (a,b,c,d) where-  rnf (x1,x2,x3,x4) = rnf x1 `seq` -		        rnf x2 `seq` -		        rnf x3 `seq` -		        rnf x4 --instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => -         NFData (a1, a2, a3, a4, a5) where-  rnf (x1, x2, x3, x4, x5) =-                  rnf x1 `seq`-                  rnf x2 `seq`-                  rnf x3 `seq`-                  rnf x4 `seq`-                  rnf x5--instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => -         NFData (a1, a2, a3, a4, a5, a6) where-  rnf (x1, x2, x3, x4, x5, x6) =-                  rnf x1 `seq`-                  rnf x2 `seq`-                  rnf x3 `seq`-                  rnf x4 `seq`-                  rnf x5 `seq`-                  rnf x6--instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => -         NFData (a1, a2, a3, a4, a5, a6, a7) where-  rnf (x1, x2, x3, x4, x5, x6, x7) =-                  rnf x1 `seq`-                  rnf x2 `seq`-                  rnf x3 `seq`-                  rnf x4 `seq`-                  rnf x5 `seq`-                  rnf x6 `seq`-                  rnf x7--instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => -         NFData (a1, a2, a3, a4, a5, a6, a7, a8) where-  rnf (x1, x2, x3, x4, x5, x6, x7, x8) =-                  rnf x1 `seq`-                  rnf x2 `seq`-                  rnf x3 `seq`-                  rnf x4 `seq`-                  rnf x5 `seq`-                  rnf x6 `seq`-                  rnf x7 `seq`-                  rnf x8--instance (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => -         NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9) where-  rnf (x1, x2, x3, x4, x5, x6, x7, x8, x9) =-                  rnf x1 `seq`-                  rnf x2 `seq`-                  rnf x3 `seq`-                  rnf x4 `seq`-                  rnf x5 `seq`-                  rnf x6 `seq`-                  rnf x7 `seq`-                  rnf x8 `seq`-                  rnf x9--instance NFData Int -instance NFData Integer-instance NFData Float-instance NFData Double--instance NFData Int8-instance NFData Int16-instance NFData Int32-instance NFData Int64--instance NFData Word8-instance NFData Word16-instance NFData Word32-instance NFData Word64--instance NFDataIntegral Int-instance NFDataOrd Int----Rational and complex numbers.--instance (Integral a, NFData a) => NFData (Ratio a) where-  rnf (x:%y) = rnf x `seq` -               rnf y `seq`-               ()--instance (RealFloat a, NFData a) => NFData (Complex a) where-  rnf (x:+y) = rnf x `seq` -	         rnf y `seq`-               ()--instance NFData Char-instance NFData Bool-instance NFData ()--instance NFData a => NFData (Maybe a) where-    rnf Nothing  = ()-    rnf (Just x) = rnf x--instance (NFData a, NFData b) => NFData (Either a b) where-    rnf (Left x)  = rnf x-    rnf (Right y) = rnf y--instance (NFData k, NFData a) => NFData (Data.Map.Map k a) where-    rnf = rnf . Data.Map.toList--instance NFData a => NFData (Data.Set.Set a) where-    rnf = rnf . Data.Set.toList--instance NFData a => NFData (Data.Tree.Tree a) where-    rnf (Data.Tree.Node r f) = rnf r `seq` rnf f--instance NFData a => NFData (Data.IntMap.IntMap a) where-    rnf = rnf . Data.IntMap.toList--instance NFData Data.IntSet.IntSet where-    rnf = rnf . Data.IntSet.toList--instance NFData a => NFData [a] where-  rnf [] = ()-  rnf (x:xs) = rnf x `seq` rnf xs--instance (Ix a, NFData a, NFData b) => NFData (Array a b) where-  rnf x = rnf (bounds x) `seq` rnf (elems x) `seq` ()
parallel.cabal view
@@ -1,5 +1,5 @@ name:		parallel-version:	2.0.0.0+version:	2.1.0.0 license:	BSD3 license-file:	LICENSE maintainer:	libraries@haskell.org@@ -20,7 +20,7 @@         Control.Parallel.Strategies   extensions:	CPP   build-depends: base    >= 4 && < 5,-                 deepseq >= 1 && < 1.1,+                 deepseq >= 1.1 && < 1.2,                  containers >= 0.2 && < 0.4,                  array      >= 0.2 && < 0.4   ghc-options: -Wall