specialize the wait API

This commit is contained in:
Harendra Kumar 2017-08-08 15:53:43 +05:30
parent 88d79e9656
commit 103c918fe1

View File

@ -82,6 +82,7 @@ wait_ (AsynclyT m) = do
-- XXX pull from children here
_ -> return ()
{-# SPECIALIZE wait :: AsynclyT IO a -> IO [a] #-}
wait :: forall m a. (MonadAsync m, MonadCatch m) => AsynclyT m a -> m [a]
wait (AsynclyT m) = liftIO (getContext Nothing) >>= run m