From 561ac4caefa6d6f77d6122e0494e395a7cb0c4ed Mon Sep 17 00:00:00 2001 From: "bringert@cs.chalmers.se" Date: Mon, 13 Nov 2006 21:52:19 +0000 Subject: [PATCH] Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce. Code comments indicated that sPar and sSeq have been superceded by sparking and demanding, and that Assoc, fstPairFstList, force and sforce are examples and hacks needed by the Lolita system. --- Control/Parallel/Strategies.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Control/Parallel/Strategies.hs b/Control/Parallel/Strategies.hs index 72a8381..9e54bde 100644 --- a/Control/Parallel/Strategies.hs +++ b/Control/Parallel/Strategies.hs @@ -119,6 +119,7 @@ sparking = flip Parallel.par -- -- 'sPar' has been superceded by 'sparking'. -- Replace @e \`using\` sPar x@ with @e \`sparking\` rwhnf x@. +{-# DEPRECATED sPar "Use sparking instead." #-} sPar :: a -> Strategy b sPar x y = x `par` () @@ -127,6 +128,7 @@ sPar x y = x `par` () -- -- 'sSeq' has been superceded by 'demanding'. -- Replace @e \`using\` sSeq x@ with @e \`demanding\` rwhnf x@. +{-# DEPRECATED sSeq "Use demanding instead." #-} sSeq :: a -> Strategy b sSeq x y = x `seq` () @@ -494,6 +496,7 @@ parArr :: (Ix b) => Strategy a -> Strategy (Array b a) parArr s arr = parList s (elems arr) -- | Associations maybe useful even without mentioning Arrays. +{-# DEPRECATED Assoc "Does not belong in Control.Parallel.Strategies" #-} data Assoc a b = a := b deriving () instance (NFData a, NFData b) => NFData (Assoc a b) where @@ -503,12 +506,14 @@ instance (NFData a, NFData b) => NFData (Assoc a b) where -- * Some strategies specific for Lolita ------------------------------------------------------------------------------ +{-# DEPRECATED fstPairFstList "This was just an example. Write your own." #-} fstPairFstList :: (NFData a) => Strategy [(a,b)] fstPairFstList = seqListN 1 (seqPair rwhnf r0) -- Some HACKs for Lolita. AFAIK force is just another name for our rnf and -- sforce is a shortcut (definition here is identical to the one in Force.lhs) +{-# DEPRECATED force, sforce "Lolita-specific hacks." #-} force :: (NFData a) => a -> a sforce :: (NFData a) => a -> b -> b -- 1.7.10.4