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 functionality?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to