Proposal: Control.Concurrent.Async

Simon Marlow marlowsd at
Tue Jul 3 15:33:40 CEST 2012

On 15/06/2012 10:39, Sjoerd Visscher wrote:
> On Fri, 15 Jun 2012 09:07:54 0100, Simon Marlow <marlowsd at> wrote:
>  > I still need to ponder the Applicative version, I'm not familiar with
>> Control.Newtype. I would still like the Traversable abstraction I
>> mentioned in my last message.
> Control.Newtype is not important. I added it just to be able to write
>    ala' Concurrently traverse getURL urls
> instead of
>    runConcurrently $ traverse (Concurrently . getURL) urls
> But it is probably nicer to have
>    doConcurrently :: Traversable t => (a -> IO b) -> t a -> IO (t b)
> then you could write
>    doConcurrently getURL urls
> and your doConcurrently would just be "doConcurrently id".
> I updated the code at

Thanks, I've incorporated your Concurrently type, and renamed 
doConcurrently to mapConcurrently (by analogy with mapM).

I released async- with the latest round of changes:

Changes in

     Added a Functor instance for Async

     Added asyncBound, asyncOn, asyncWithUnmask, asyncOnWithUnmask, 
withAsyncBound, withAsyncOn, withAsyncWithUnmask, withAsyncOnWithUnmask.

     Added mapConcurrently

     Added Concurrently (with Applicative and Alternative instances)


More information about the Libraries mailing list