[Haskell-cafe] forkSequence, runPar, parallelize (was: Re: You are in a twisty maze of concurrency libraries, all different ...)

Mario Blazevic mblazevic at stilo.com
Wed Dec 9 15:17:56 EST 2009

	It appears there are several implementations existing on Hackage of the 
following function, in various disguises:

    runPar :: [IO a] -> IO [a]

the idea being that the IO computations are run in parallel, rather than 
sequentially. My own Streaming Component Combinators package contains a 
similar function, but somewhat generalized:

    class Monad m => ParallelizableMonad m where
       parallelize :: m a -> m b -> m (a, b)

    instance ParallelizableMonad IO  -- implemented using forkIO
    instance ParallelizableMonad Identity  -- implemented using par
    instance ParallelizableMonad Maybe  -- implemented using par

	Would there be any interest in having this class packaged in a separate 
library? If so, can you sugest a better name or some additional 

More information about the Haskell-Cafe mailing list