W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV'(c) The University of Glasgow 2001-2009/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafe  The type  a is a -> ()q. Thus, a strategy is a function whose sole purpose it is to evaluate its argument (either in full or in part).*Evaluate a value using the given strategy.;Evaluate a value using the given strategy. This is simply  with arguments reversed. performs *no* evaluation.1 evaluates its argument to weak head normal form.0 fully evaluates its argument. Relies on class  from module Control.DeepSeq.gEvaluate each element of a list according to the given strategy. This function is a specialisation of   to lists.HEvaluate the first n elements of a list according to the given strategy. Evaluate the nth element of a list (if there is such) according to the given strategy. The spine of the list up to the nth element is evaluated as a side effect. TEvaluate the elements of a foldable data structure according to the given strategy. Evaluate the elements of an array according to the given strategy. Evaluation of the array bounds may be triggered as a side effect. @Evaluate the bounds of an array according to the given strategy. HEvaluate the keys and values of a map according to the given strategies.    "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportableNoneIndicates that it may be beneficial to evaluate the first argument in parallel with the second. Returns the value of the second argument.a `` b' is exactly equivalent semantically to b.par% is generally used when the value of a_ is likely to be required later, but not immediately. Also it is a good idea to ensure that a is not a trivial computation, otherwise the cost of spawning it in parallel overshadows the benefits obtained by running it in parallel.YNote that actual parallelism is only supported by certain implementations (GHC with the  -threaded8 option, and GPH, for now). On other implementations,  par a b = b.Semantically identical to W-, but with a subtle operational difference: WO is strict in both its arguments, so the compiler may, for example, rearrange a `W` b into b `W` a `W` b*. This is normally no problem when using W to express strictness, but it can be a problem when annotating code for parallelism, because we need more control over the order of evaluation; we may want to evaluate a before b, because we know that b, has already been sparked in parallel with .This is why we have . In contrast to W,  is only strict in its first argument (as far as the compiler is concerned), which restricts the transformations that the compiler can do, and ensures that the user can retain control of the evaluation order.'(c) The University of Glasgow 2001-2010/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableNone<0DEPRECCATED: replaced by the  monad A name for Control.Seq.Strategy, for documentation only.A  is a function that embodies a parallel evaluation strategy. The function traverses (parts of) its argument, evaluating subexpressions in parallel or in sequence.A  may do an arbitrary amount of evaluation of its argument, but should not return a value different from the one it was passed.}Parallel computations may be discarded by the runtime system if the program no longer requires their result, which is why a l function returns a new value equivalent to the old value. The intention is that the program applies the o to a structure, and then uses the returned value, discarding the old value. This idiom is expressed by the  function.l is a Monad that makes it easier to define parallel strategies. It is a strict identity monad: that is, in m >>= fm- is evaluated before the result is passed to f. \instance Monad Eval where return = Done m >>= k = case m of Done x -> k xIf you wanted to construct a s for a pair that sparked the first component in parallel and then evaluated the second component, you could write [myStrat :: Strategy (a,b) myStrat (a,b) = do { a' <- rpar a; b' <- rseq b; return (a',b') }RAlternatively, you could write this more compactly using the Applicative style as )myStrat (a,b) = (,) <$> rpar a <*> rseq b!Pull the result out of the monad.!Evaluate a value using the given . x `using` s = runEval (s x)!evaluate a value using the given . This is simply  with the arguments reversed.aCompose two strategies sequentially. This is the analogue to function composition on strategies. 3strat2 `dot` strat1 == strat2 . withStrategy strat1 WInject a sequential strategy (ie. coerce a sequential strategy to a general strategy). Thanks to   , the type Control.Seq.Strategy a is a subtype of  a.!! performs *no* evaluation. r0 == evalSeq Control.Seq.r0""1 evaluates its argument to weak head normal form.  rseq == evalSeq Control.Seq.rseq## fully evaluates its argument. (rdeepseq == evalSeq Control.Seq.rdeepseq$$2 sparks its argument (for evaluation in parallel).%instead of saying rpar  strat, you can say rparWith strat. Compared to $, %does not exit the  monaddoes not have a built-in ", so for example `rparWith r0` behaves as you might expect (it is a strategy that creates a spark that does no evaluation).&WEvaluate the elements of a traversable data structure according to the given strategy.'Like &( but evaluates all elements in parallel.(QEvaluate each element of a list according to the given strategy. Equivalent to & at the list type.)YEvaluate each element of a list in parallel according to given strategy. Equivalent to ' at the list type.*evaListSplitAt n stratPref stratSuff" evaluates the prefix (of length n) of a list according to  stratPref" and its the suffix according to  stratSuff.+Like *) but evaluates both sublists in parallel.,HEvaluate the first n elements of a list according to the given strategy.-Like ,0 but evaluates the first n elements in parallel..Evaluate the nth element of a list (if there is such) according to the given strategy. The spine of the list up to the nth element is evaluated as a side effect./Like ,+ but evaluates the nth element in parallel.06Divides a list into chunks, and applies the strategy ( strat to each chunk in parallel.nIt is expected that this function will be replaced by a more generic clustering infrastructure in the future. If the chunk size is 1 or less, 0 is equivalent to )XDEPRECATED: use ) " instead1A combination of ) and Y!, encapsulating a common pattern: 5parMap strat f = withStrategy (parList strat) . map f22: is a rolling buffer strategy combinator for (lazy) lists.2 is not as compositional as the type suggests. In fact, it evaluates list elements at least to weak head normal form, disregarding a strategy argument !. $evalBuffer n r0 == evalBuffer n rseq3Like 2P but evaluates the list elements in parallel when pushing them into the buffer.DzSequential function application. The argument is evaluated using the given strategy before it is given to the function.E~Parallel function application. The argument is evaluated using the given strategy, in parallel with the function application.FSequential function composition. The result of the second function is evaluated using the given strategy, and then given to the first function.GParallel function composition. The result of the second function is evaluated using the given strategy, in parallel with the application of the first function.HSequential inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, and then given to the second function.IParallel inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, in parallel with the application of the second function.JDEPRECATED: Use  or D insteadKDEPRECATED: Use  or E insteadLDEPRECATED: Use  or D insteadMDEPRECATED: Use  or E insteadNDEPRECATED: renamed to "ODEPRECATED: renamed to &PDEPRECATED: renamed to 'QDEPRECATED: renamed to (RDEPRECATED: renamed to 4SDEPRECATED: renamed to <TDEPRECATED: renamed to 5UDEPRECATED: renamed to =VDEPRECATED: renamed to IZ[\ !"#$%&'()*+,-./0]X1^2_3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV`ab@ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV@!"#$% &'(),-./*+0123456789:;<=>?@ABCDEFGHIJKLMNVOPQRSTUGZ[\ !"#$%&'()*+,-./0]X1^2_3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV`ab c      ! "#   $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP QRSTUVWXYZ[\]] ^_`abcdparal_Lchapb2CNVN5VnEKOSti48Control.Parallel.Strategies Control.SeqControl.Paralleldeeps_LbCWUlehDDeLxurARKDH5oControl.DeepSeqNFDataStrategyusing withStrategyr0rseqrdeepseqseqListseqListN seqListNth seqFoldableseqArrayseqArrayBoundsseqMap seqTuple2 seqTuple3 seqTuple4 seqTuple5 seqTuple6 seqTuple7 seqTuple8 seqTuple9parpseqDone SeqStrategyEvalrunEvaldotevalSeqrparrparWithevalTraversableparTraversableevalListparListevalListSplitAtparListSplitAt evalListNparListN evalListNth parListNth parListChunkparMap evalBuffer parBuffer evalTuple2 evalTuple3 evalTuple4 evalTuple5 evalTuple6 evalTuple7 evalTuple8 evalTuple9 parTuple2 parTuple3 parTuple4 parTuple5 parTuple6 parTuple7 parTuple8 parTuple9$|$||.|.||-|-|| demandingsparking>|>||rwhnf seqTraverse parTraverseseqPairparPair seqTriple parTripleunEvalghc-primGHC.Primseq parListWHNFbaseGHC.BasemapLiftchunkevalBufferWHNF parBufferWHNF $fMonadEval$fApplicativeEval $fFunctorEval