`^*      !"#$%&'()portablestablelibraries@haskell.org:Indicates that it may be beneficial to evaluate the first A 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 A required later, but not immediately. Also it is a good idea to  ensure that a5 is not a trivial computation, otherwise the cost of > spawning it in parallel overshadows the benefits obtained by  running it in parallel. :Note that actual parallelism is only supported by certain  implementations (GHC with the  -threaded option, and GPH, for " now). On other implementations,  par a b = b. Semantically identical to  , but with a subtle operational  difference: 2 is strict in both its arguments, so the compiler  may, for example, rearrange a `` b into b `` a `` b. ( This is normally no problem when using  to express strictness, ? but it can be a problem when annotating code for parallelism, C 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 ,  is only E strict in its first argument (as far as the compiler is concerned), C which restricts the transformations that the compiler can do, and C ensures that the user can retain control of the evaluation order. portable experimentallibraries@haskell.org&A = is a function that embodies a parallel evaluation strategy. K The function traverses (parts of) its argument, evaluating subexpressions  in parallel or in sequence. A 1 may do an arbitrary amount of evaluation of its C argument, but should not return a value different from the one it  was passed. DParallel computations may be discarded by the runtime system if the 9 program no longer requires their result, which is why a  @ function returns a new value equivalent to the old value. The + intention is that the program applies the  to a A structure, and then uses the returned value, discarding the old ( value. This idiom is expressed by the   function. : is an Applicative Functor that makes it easier to define 9 parallel strategies that involve traversing structures. a  > value will be evaluated strictly in sequence in its context,  whereas a  4 value wraps an expression that may be evaluated in D parallel. The Applicative instance allows sequential composition, E making it possible to describe an evaluateion strategy by composing    and   with *.  For example,  ' parList :: Strategy a -> Strategy [a] 2 parList strat = traverse (Par . (`using` strat)) 7 seqPair :: Strategy a -> Strategy b -> Strategy (a,b) . seqPair f g (a,b) = pure (,) <$> f a <*> g b  !evaluate a value using the given .  using x s = s x !evaluate a value using the given . This is simply   . with the arguments reversed, and is equal to '($)'. A ) that does no evaluation of its argument A 8 that simply evaluates its argument to Weak Head Normal = Form (i.e. evaluates it as far as the topmost constructor). A ) that evaluates its argument in parallel A # that fully evaluates its argument  rdeepseq a = rnf a `pseq` a AA strategy that traverses a container data type with an instance  of +5, and sparks each of the elements using the supplied  strategy. AA strategy that traverses a container data type with an instance  of +6, and evaluates each of the elements in left-to-right ' sequence using the supplied strategy. ?Spark each of the elements of a list using the given strategy.  Equivalent to  at the list type. HEvaluate each of the elements of a list sequentially from left to right * using the given strategy. Equivalent to  at the list type. ,IApplies a strategy to the nth element of list when the head is demanded.  More precisely:  semantics: parBuffer n s = id :: [a] -> [a] D dynamic behaviour: evalutates the nth element of the list when the  head is demanded. The idea is to provide a `rolling buffer' of length n. It is a  better than  for a lazy stream, because  will # evaluate the entire list, whereas  will only evaluate a ! fixed number of elements ahead.  version of  specialised to . This version is & much simpler, and may be faster than ' parList rwhnf'. You should ( never need to use this directly, since ' parList rwhnf' is  automatically optimised to . It is here for  experimentation purposes only.  version of  specialised to . You should ( never need to use this directly, since 'parBuffer rwhnf' is  automatically optimised to . It is here for  experimentation purposes only. ASequential function application. The argument is evaluated using : the given strategy before it is given to the function. !?Parallel function application. The argument is evaluated using @ the given strategy, in parallel with the function application. "/Sequential function composition. The result of = the second function is evaluated using the given strategy, ' and then given to the first function. #8Parallel function composition. The result of the second 1 function is evaluated using the given strategy, 9 in parallel with the application of the first function. $*Sequential inverse function composition, 7 for those who read their programs from left to right. : The result of the first function is evaluated using the 8 given strategy, and then given to the second function. %'Parallel inverse function composition, 7 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. &'()'  !"#$%&'()'  !"#$%  &'()%   !"#$%&'()-      !"#$%&'()*+,-./012314567parallel-2.2.0.0Control.ParallelControl.Parallel.Strategiesghc-primGHC.Primseqdeepseq-1.1.0.0Control.DeepSeqrnfNFDataparpseqDoneStrategyEvalLazyParSequnEvalusing withStrategyr0rwhnfrparrdeepseqseqPairparPair seqTriple parTriple parTraverse seqTraverseparListseqListparListN parListChunkparMap parBuffer parListWHNF parBufferWHNF$|$||.|.||-|-|| demandingsparking>|>||baseControl.Applicative<*>Data.Traversable Traversablechunk