[Haskell-cafe] Control.Parallel and the Reader monad

Paul Brauner paul.brauner at loria.fr
Wed Dec 23 06:13:31 EST 2009


I'm facing the following problem. I've got come computation 

  c :: a -> Reader e b

that i'm running on several as:

  mapM c xs

A natural optimisation of this program would to be to take advantage of
Control.Parallel to run these computation in parallel, which seems sound
since the Reader monad is commutative. Unfortunately, I didn't manage to
do so.

Has this situation been tackled with before ? Is there some library or
function I've missed involving commutative monads and Control.Parallel ?


More information about the Haskell-Cafe mailing list