Skip to content

Commit

Permalink
Tidy up Haddocks
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmar committed Dec 11, 2012
1 parent e773bec commit ffe8db5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 43 deletions.
43 changes: 25 additions & 18 deletions monad-par/Control/Monad/Par.hs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

{-| (NOTE: This module reexports a default Par scheduler. A generic
interface can be found in "Control.Monad.Par.Class" and other
schedulers, sometimes with different capabilities, can be found in
"Control.Monad.Par.Scheds".)
The @monad-par@ package provides a family of @Par@ monads, for speeding up pure
computations using parallel processors. They cannot be used for
speeding up computations that use IO (for that, see
@Control.Concurrent@). The result of a given @Par@ computation is
always the same - ie. it is deterministic, but the computation may
be performed more quickly if there are processors available to
share the work.
{-|
The @monad-par@ package provides a family of @Par@ monads, for
speeding up pure computations using parallel processors. (for a similar
programming model for use with @IO@, see "Control.Monad.Par.IO".)
The result of a given @Par@ computation is always the same - i.e. it
is deterministic, but the computation may be performed more quickly
if there are processors available to share the work.
For example, the following program fragment computes the values of
@(f x)@ and @(g x)@ in parallel, and returns a pair of their results:
Expand Down Expand Up @@ -69,17 +66,27 @@
parallel work are only created by @fork@ and a few other
combinators.
The implementation is based on a work-stealing scheduler that
divides the work as evenly as possible between the available
processors at runtime.
The default implementation is based on a work-stealing scheduler
that divides the work as evenly as possible between the available
processors at runtime. Other schedulers are available that are
based on different policies and have different performance
characteristics. To use one of these other schedulers, just import
its module instead of "Control.Monad.Par":
* "Control.Monad.Par.Scheds.Trace"
* "Control.Monad.Par.Scheds.Sparks"
For more information on the programming model, please see these sources:
* The wiki/tutorial (<http://www.haskell.org/haskellwiki/Par_Monad:_A_Parallelism_Tutorial>)
* The wiki\/tutorial (<http://www.haskell.org/haskellwiki/Par_Monad:_A_Parallelism_Tutorial>)
* The original paper (<http://www.cs.indiana.edu/~rrnewton/papers/haskell2011_monad-par.pdf>)
* Tutorial slides (<http://community.haskell.org/~simonmar/slides/CUFP.pdf>)
* Other slides: <http://www.cs.ox.ac.uk/ralf.hinze/WG2.8/28/slides/simon.pdf>,
<http://www.cs.indiana.edu/~rrnewton/talks/2011_HaskellSymposium_ParMonad.pdf>
* Other slides: (<http://www.cs.ox.ac.uk/ralf.hinze/WG2.8/28/slides/simon.pdf>,
<http://www.cs.indiana.edu/~rrnewton/talks/2011_HaskellSymposium_ParMonad.pdf>)
-}

Expand Down
42 changes: 17 additions & 25 deletions monad-par/monad-par.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,23 @@ Synopsis: A library for parallel programming based on a monad
-- 0.3.1 : fix for ghc 7.6.1, expose Par.IO
-- 0.3.4 : switch to direct scheduler as default

Description: This library offers an alternative parallel programming
API to that provided by the @parallel@ package.

A 'Par' monad allows the simple description of
parallel computations, and can be used to add
parallelism to pure Haskell code. The basic API
is straightforward: the monad supports forking
and simple communication in terms of 'IVar's.

The library comes with a work-stealing
implementation, but the internals are also
exposed so that you can build your own scheduler
if necessary.


Examples of use can be found in the examples/ directory
of the source package.


The modules below provide additionaly schedulers,
data structures, and other added capabilities
layered on top of the 'Par' monad.

-- * Finish These
-- * Module Descriptions
Description:
The 'Par' monad offers a simple API for parallel programming. The
library works for parallelising both pure and @IO@ computations,
although only the pure version is deterministic.
.
For complete documentation see "Control.Monad.Par".
.
Some examples of use can be found in the @examples/@ directory of
the source package.
.
Other related packages:
.
* @abstract-par@ provides the type classes that abstract over different
implementations of the @Par@ monad.
.
* @monad-par-extras@ provides some extra combinators layered on top of
the @Par@ monad.

Homepage: https://github.com/simonmar/monad-par
License: BSD3
Expand Down

0 comments on commit ffe8db5

Please sign in to comment.