Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 70ec89744a04da80369b4702b2c37256 > files > 1553

ghc-doc-6.10.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Control.Parallel.Strategies</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Control-Parallel-Strategies.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>parallel-1.1.0.1: parallel programming library</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Control.Parallel.Strategies</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>non-portable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>experimental</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>libraries@haskell.org</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Strategy Type, Application and Semantics
</A
></DT
><DT
><A HREF="#2"
>Basic Strategies				     
</A
></DT
><DT
><A HREF="#3"
>Strategic Function Application
</A
></DT
><DT
><A HREF="#4"
>Tuples
</A
></DT
><DT
><A HREF="#5"
>Lists: Parallel Strategies
</A
></DT
><DT
><A HREF="#6"
>Lists: Sequential Strategies
</A
></DT
><DT
><A HREF="#7"
>Arrays
</A
></DT
><DT
><A HREF="#8"
>Deprecated types and functions
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>Parallel strategy combinators. See
 <A HREF="http://www.macs.hw.ac.uk/~dsg/gph/papers/html/Strategies/strategies.html"
>http://www.macs.hw.ac.uk/~dsg/gph/papers/html/Strategies/strategies.html</A
>
 for more information.
</P
><P
>Original authors:
	Phil Trinder, Hans-Wolfgang Loidl, Kevin Hammond et al. 
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3ADone"
>Done</A
> = <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AStrategy"
>Strategy</A
> a = a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%3E%7C"
>(&gt;|)</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%3E%7C%7C"
>(&gt;||)</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Ausing"
>using</A
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Ademanding"
>demanding</A
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asparking"
>sparking</A
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Ar0"
>r0</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Arwhnf"
>rwhnf</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>  <A HREF="#t%3ANFData"
>NFData</A
> a  <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3Arnf"
>rnf</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%24%7C"
>($|)</A
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%24%7C%7C"
>($||)</A
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A.%7C"
>(.|)</A
> ::  (b -&gt; c) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A.%7C%7C"
>(.||)</A
> ::  (b -&gt; c) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A-%7C"
>(-|)</A
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (b -&gt; c) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A-%7C%7C"
>(-||)</A
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (b -&gt; c) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqPair"
>seqPair</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparPair"
>parPair</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqTriple"
>seqTriple</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b, c)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparTriple"
>parTriple</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b, c)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparList"
>parList</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparListN"
>parListN</A
> :: <A HREF="../base/Prelude.html#t%3AIntegral"
>Integral</A
> b =&gt; b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparListNth"
>parListNth</A
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparListChunk"
>parListChunk</A
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparMap"
>parMap</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; [a] -&gt; [b]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparFlatMap"
>parFlatMap</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b] -&gt; (a -&gt; [b]) -&gt; [a] -&gt; [b]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparZipWith"
>parZipWith</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqList"
>seqList</A
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqListN"
>seqListN</A
> :: <A HREF="../base/Prelude.html#t%3AIntegral"
>Integral</A
> a =&gt; a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqListNth"
>seqListNth</A
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparBuffer"
>parBuffer</A
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; [a] -&gt; [a]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AseqArr"
>seqArr</A
> :: <A HREF="../base/GHC-Arr.html#t%3AIx"
>Ix</A
> b =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (<A HREF="../base/GHC-Arr.html#t%3AArray"
>Array</A
> b a)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparArr"
>parArr</A
> :: <A HREF="../base/GHC-Arr.html#t%3AIx"
>Ix</A
> b =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (<A HREF="../base/GHC-Arr.html#t%3AArray"
>Array</A
> b a)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsPar"
>sPar</A
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsSeq"
>sSeq</A
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AAssoc"
>Assoc</A
> a b = a <A HREF="#v%3A%3A%3D"
>:=</A
> b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfstPairFstList"
>fstPairFstList</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [(a, b)]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aforce"
>force</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; a -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asforce"
>sforce</A
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; a -&gt; b -&gt; b</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>Strategy Type, Application and Semantics
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:Done"
><A NAME="t%3ADone"
></A
></A
><B
>Done</B
> = <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:Strategy"
><A NAME="t%3AStrategy"
></A
></A
><B
>Strategy</B
> a = a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="doc"
>A strategy takes a value and returns a <TT
><A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TT
> value to indicate that
   the specifed evaluation has been performed.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:>|"
><A NAME="v%3A%3E%7C"
></A
></A
><B
>(&gt;|)</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="doc"
>Evaluates the first argument before the second.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:>||"
><A NAME="v%3A%3E%7C%7C"
></A
></A
><B
>(&gt;||)</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
></TD
></TR
><TR
><TD CLASS="doc"
>Evaluates the first argument in parallel with the second.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:using"
><A NAME="v%3Ausing"
></A
></A
><B
>using</B
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a</TD
></TR
><TR
><TD CLASS="doc"
><P
>Takes a value and a strategy, and applies the strategy to the
 value before returning the value. Used to express data-oriented 
 parallelism. <TT
>x `using` s</TT
> is a projection on <TT
>x</TT
>, i.e. both:
</P
><DL
><DT
>a retraction</DT
><DD
> <TT
>x `using` s</TT
> &#x2291; <TT
>x</TT
>
</DD
><DT
>idempotent</DT
><DD
> <TT
>(x `using` s) `using` s</TT
> = <TT
>x `using` s</TT
>
</DD
></DL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:demanding"
><A NAME="v%3Ademanding"
></A
></A
><B
>demanding</B
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; a</TD
></TR
><TR
><TD CLASS="doc"
>Evaluates the second argument before the first.
 Used to express control-oriented parallelism. The second
 argument is usually a strategy application.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:sparking"
><A NAME="v%3Asparking"
></A
></A
><B
>sparking</B
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3ADone"
>Done</A
> -&gt; a</TD
></TR
><TR
><TD CLASS="doc"
>Evaluates the second argument in parallel with the first.
 Used to express control-oriented
 parallelism. The second argument is usually a strategy application.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="2"
><A NAME="2"
>Basic Strategies				     
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:r0"
><A NAME="v%3Ar0"
></A
></A
><B
>r0</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
><TR
><TD CLASS="doc"
>Performs <EM
>no</EM
> evaluation of its argument.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:rwhnf"
><A NAME="v%3Arwhnf"
></A
></A
><B
>rwhnf</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
><TR
><TD CLASS="doc"
>Reduces its argument to weak head normal form.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>  <A NAME="t:NFData"
><A NAME="t%3ANFData"
></A
></A
><B
>NFData</B
> a  <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
>Methods</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A NAME="v:rnf"
><A NAME="v%3Arnf"
></A
></A
><B
>rnf</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a</TD
></TR
><TR
><TD CLASS="doc"
>Reduces its argument to (head) normal form.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:NFData')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:NFData" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3ADouble"
>Double</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AFloat"
>Float</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Int.html#t%3AInt8"
>Int8</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Int.html#t%3AInt16"
>Int16</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Int.html#t%3AInt32"
>Int32</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Int.html#t%3AInt64"
>Int64</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Word.html#t%3AWord8"
>Word8</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Word.html#t%3AWord16"
>Word16</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Word.html#t%3AWord32"
>Word32</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../base/Data-Word.html#t%3AWord64"
>Word64</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> <A HREF="../containers/Data-IntSet.html#t%3AIntSet"
>IntSet</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> ([] a)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="../base/Prelude.html#t%3AIntegral"
>Integral</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../base/Data-Ratio.html#t%3ARatio"
>Ratio</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="../base/Prelude.html#t%3ARealFloat"
>RealFloat</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../base/Data-Complex.html#t%3AComplex"
>Complex</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../containers/Data-IntMap.html#t%3AIntMap"
>IntMap</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../containers/Data-Tree.html#t%3ATree"
>Tree</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../containers/Data-Set.html#t%3ASet"
>Set</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../base/Data-Either.html#t%3AEither"
>Either</A
> a b)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%29"
>(,)</A
> a b)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="../base/GHC-Arr.html#t%3AIx"
>Ix</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../base/GHC-Arr.html#t%3AArray"
>Array</A
> a b)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> k, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../containers/Data-Map.html#t%3AMap"
>Map</A
> k a)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="Control-Parallel-Strategies.html#t%3AAssoc"
>Assoc</A
> a b)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> c) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%29"
>(,,)</A
> a b c)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> c, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> d) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%29"
>(,,,)</A
> a b c d)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a1, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a2, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a3, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a4, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a5) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%2C%29"
>(,,,,)</A
> a1 a2 a3 a4 a5)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a1, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a2, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a3, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a4, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a5, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a6) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%2C%2C%29"
>(,,,,,)</A
> a1 a2 a3 a4 a5 a6)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a1, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a2, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a3, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a4, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a5, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a6, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a7) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%2C%2C%2C%29"
>(,,,,,,)</A
> a1 a2 a3 a4 a5 a6 a7)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a1, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a2, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a3, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a4, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a5, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a6, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a7, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a8) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%2C%2C%2C%2C%29"
>(,,,,,,,)</A
> a1 a2 a3 a4 a5 a6 a7 a8)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a1, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a2, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a3, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a4, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a5, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a6, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a7, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a8, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a9) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="../ghc-prim/GHC-Tuple.html#t%3A%28%2C%2C%2C%2C%2C%2C%2C%2C%29"
>(,,,,,,,,)</A
> a1 a2 a3 a4 a5 a6 a7 a8 a9)</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="3"
><A NAME="3"
>Strategic Function Application
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:$|"
><A NAME="v%3A%24%7C"
></A
></A
><B
>($|)</B
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a -&gt; b</TD
></TR
><TR
><TD CLASS="doc"
>Sequential function application. The argument is evaluated using
   the given strategy before it is given to the function.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:$||"
><A NAME="v%3A%24%7C%7C"
></A
></A
><B
>($||)</B
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; a -&gt; b</TD
></TR
><TR
><TD CLASS="doc"
>Parallel function application. The argument is evaluated using
 the given strategy, in parallel with the function application.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:.|"
><A NAME="v%3A.%7C"
></A
></A
><B
>(.|)</B
> ::  (b -&gt; c) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="doc"
>Sequential function composition. The result of
 the second function is evaluated using the given strategy, 
 and then given to the first function.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:.||"
><A NAME="v%3A.%7C%7C"
></A
></A
><B
>(.||)</B
> ::  (b -&gt; c) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="doc"
>Parallel function composition. The result of the second
 function is evaluated using the given strategy,
 in parallel with the application of the first function.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:-|"
><A NAME="v%3A-%7C"
></A
></A
><B
>(-|)</B
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (b -&gt; c) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="doc"
>Sequential 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.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:-||"
><A NAME="v%3A-%7C%7C"
></A
></A
><B
>(-||)</B
> ::  (a -&gt; b) -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (b -&gt; c) -&gt; a -&gt; c</TD
></TR
><TR
><TD CLASS="doc"
>Parallel 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.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="4"
><A NAME="4"
>Tuples
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqPair"
><A NAME="v%3AseqPair"
></A
></A
><B
>seqPair</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b)</TD
></TR
><TR
><TD CLASS="doc"
>Apply two strategies to the elements of a pair sequentially
   from left to right.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parPair"
><A NAME="v%3AparPair"
></A
></A
><B
>parPair</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b)</TD
></TR
><TR
><TD CLASS="doc"
>Apply two strategies to the elements of a pair in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqTriple"
><A NAME="v%3AseqTriple"
></A
></A
><B
>seqTriple</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b, c)</TD
></TR
><TR
><TD CLASS="doc"
>Apply three strategies to the elements of a triple in sequentially
   from left to right.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parTriple"
><A NAME="v%3AparTriple"
></A
></A
><B
>parTriple</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (a, b, c)</TD
></TR
><TR
><TD CLASS="doc"
>Apply three strategies to the elements of a triple in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="5"
><A NAME="5"
>Lists: Parallel Strategies
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parList"
><A NAME="v%3AparList"
></A
></A
><B
>parList</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="doc"
>Applies a strategy to every element of a list in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parListN"
><A NAME="v%3AparListN"
></A
></A
><B
>parListN</B
> :: <A HREF="../base/Prelude.html#t%3AIntegral"
>Integral</A
> b =&gt; b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="doc"
>Applies a strategy to the first <TT
>n</TT
> elements of a list in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parListNth"
><A NAME="v%3AparListNth"
></A
></A
><B
>parListNth</B
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="doc"
>Evaluates <TT
>n</TT
> elements of the spine of the argument list and applies
 the given strategy to the <TT
>n</TT
>th element (if there is one) in parallel with
 the result. E.g. <TT
>parListNth 2 [e1, e2, e3]</TT
> evaluates <TT
>e3</TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parListChunk"
><A NAME="v%3AparListChunk"
></A
></A
><B
>parListChunk</B
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="doc"
>Splits a list into chunks (sub-sequences) of length <TT
>n</TT
>,
 and applies a strategy sequentially to the elements in each
 chunk. The chunks are evaluated in parallel.
 This is useful for increasing the grain size.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parMap"
><A NAME="v%3AparMap"
></A
></A
><B
>parMap</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; (a -&gt; b) -&gt; [a] -&gt; [b]</TD
></TR
><TR
><TD CLASS="doc"
>Applies a function to each element of a list and 
 and evaluates the result list in parallel,
 using the given strategy for each element.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parFlatMap"
><A NAME="v%3AparFlatMap"
></A
></A
><B
>parFlatMap</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b] -&gt; (a -&gt; [b]) -&gt; [a] -&gt; [b]</TD
></TR
><TR
><TD CLASS="doc"
>Uses <TT
><A HREF="Control-Parallel-Strategies.html#v%3AparMap"
>parMap</A
></TT
> to apply a list-valued function to each
 element of a list in parallel, and concatenates the results.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parZipWith"
><A NAME="v%3AparZipWith"
></A
></A
><B
>parZipWith</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> c -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]</TD
></TR
><TR
><TD CLASS="doc"
>Zips together two lists using a function,
 and evaluates the result list in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="6"
><A NAME="6"
>Lists: Sequential Strategies
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqList"
><A NAME="v%3AseqList"
></A
></A
><B
>seqList</B
> ::  <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [a]</TD
></TR
><TR
><TD CLASS="doc"
>Sequentially applies a strategy to each element of a list.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqListN"
><A NAME="v%3AseqListN"
></A
></A
><B
>seqListN</B
> :: <A HREF="../base/Prelude.html#t%3AIntegral"
>Integral</A
> a =&gt; a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b]</TD
></TR
><TR
><TD CLASS="doc"
>Sequentially applies a strategy to the first n elements of a list.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqListNth"
><A NAME="v%3AseqListNth"
></A
></A
><B
>seqListNth</B
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [b]</TD
></TR
><TR
><TD CLASS="doc"
>Applies a strategy to the <TT
>n</TT
>th element of a list
  (if there is one) before returning the result. 
  E.g. <TT
>seqListNth 2 [e1, e2, e3]</TT
> evaluates <TT
>e3</TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parBuffer"
><A NAME="v%3AparBuffer"
></A
></A
><B
>parBuffer</B
> ::  <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; [a] -&gt; [a]</TD
></TR
><TR
><TD CLASS="doc"
><P
>Applies a strategy to the nth element of list when the head is demanded.
 More precisely:
</P
><UL
><LI
> semantics: <TT
>parBuffer n s = id :: [a] -&gt; [a]</TT
>
</LI
><LI
> dynamic behaviour: evalutates the nth element of the list when the
 head is demanded.
</LI
></UL
><P
>The idea is to provide a `rolling buffer' of length n.
</P
><P
><TT
><A HREF="Control-Parallel-Strategies.html#v%3AparBuffer"
>parBuffer</A
></TT
> has been added for the revised version of the strategies
 paper and supersedes the older <TT
>fringeList</TT
>.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="7"
><A NAME="7"
>Arrays
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:seqArr"
><A NAME="v%3AseqArr"
></A
></A
><B
>seqArr</B
> :: <A HREF="../base/GHC-Arr.html#t%3AIx"
>Ix</A
> b =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (<A HREF="../base/GHC-Arr.html#t%3AArray"
>Array</A
> b a)</TD
></TR
><TR
><TD CLASS="doc"
>Apply a strategy to all elements of an array sequentially.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parArr"
><A NAME="v%3AparArr"
></A
></A
><B
>parArr</B
> :: <A HREF="../base/GHC-Arr.html#t%3AIx"
>Ix</A
> b =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> (<A HREF="../base/GHC-Arr.html#t%3AArray"
>Array</A
> b a)</TD
></TR
><TR
><TD CLASS="doc"
>Apply a strategy to all elements of an array in parallel.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="8"
><A NAME="8"
>Deprecated types and functions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:sPar"
><A NAME="v%3AsPar"
></A
></A
><B
>sPar</B
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b</TD
></TR
><TR
><TD CLASS="doc"
><P
>A strategy corresponding to <TT
><A HREF="Control-Parallel.html#v%3Apar"
>par</A
></TT
>: 
 <TT
>x `par` e</TT
> = <TT
>e `using` sPar x</TT
>.
</P
><P
><TT
><A HREF="Control-Parallel-Strategies.html#v%3AsPar"
>sPar</A
></TT
> has been superceded by <TT
><A HREF="Control-Parallel-Strategies.html#v%3Asparking"
>sparking</A
></TT
>.
 Replace <TT
>e `using` sPar x</TT
> with <TT
>e `sparking` rwhnf x</TT
>.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:sSeq"
><A NAME="v%3AsSeq"
></A
></A
><B
>sSeq</B
> ::  a -&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> b</TD
></TR
><TR
><TD CLASS="doc"
><P
>A strategy corresponding to <TT
>seq</TT
>: 
 <TT
>x `seq` e</TT
> = <TT
>e `using` sSeq x</TT
>.
</P
><P
><TT
><A HREF="Control-Parallel-Strategies.html#v%3AsSeq"
>sSeq</A
></TT
> has been superceded by <TT
><A HREF="Control-Parallel-Strategies.html#v%3Ademanding"
>demanding</A
></TT
>. 
 Replace <TT
>e `using` sSeq x</TT
> with <TT
>e `demanding` rwhnf x</TT
>.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Assoc"
><A NAME="t%3AAssoc"
></A
></A
><B
>Assoc</B
> a b </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
>a <A NAME="v::="
><A NAME="v%3A%3A%3D"
></A
></A
><B
>:=</B
> b</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Assoc')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Assoc" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>(<A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a, <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> b) =&gt; <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> (<A HREF="Control-Parallel-Strategies.html#t%3AAssoc"
>Assoc</A
> a b)</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:fstPairFstList"
><A NAME="v%3AfstPairFstList"
></A
></A
><B
>fstPairFstList</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; <A HREF="Control-Parallel-Strategies.html#t%3AStrategy"
>Strategy</A
> [(a, b)]</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:force"
><A NAME="v%3Aforce"
></A
></A
><B
>force</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; a -&gt; a</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:sforce"
><A NAME="v%3Asforce"
></A
></A
><B
>sforce</B
> :: <A HREF="Control-Parallel-Strategies.html#t%3ANFData"
>NFData</A
> a =&gt; a -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>