packages feed

lifted-async 0.10.1.3 → 0.10.2

raw patch · 3 files changed

+16/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for lifted-async +## v0.10.2 - 20201-04-02++* Define withAsync in terms of corresponding function from async ([#36](https://github.com/maoe/lifted-async/pull/36))+  * Fixes [#34](https://github.com/maoe/lifted-async/issues/34)+ ## v0.10.1.3 - 2021-02-26  * Support GHC 9.0.1 ([#33](https://github.com/maoe/lifted-async/pull/33))
lifted-async.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.24 name:                lifted-async-version:             0.10.1.3+version:             0.10.2 synopsis:            Run lifted IO operations asynchronously and wait for their results homepage:            https://github.com/maoe/lifted-async bug-reports:         https://github.com/maoe/lifted-async/issues
src/Control/Concurrent/Async/Lifted.hs view
@@ -139,7 +139,7 @@   => m a   -> (Async (StM m a) -> m b)   -> m b-withAsync = withAsyncUsing async+withAsync = liftWithAsync A.withAsync {-# INLINABLE withAsync #-}  -- | Generalized version of 'A.withAsyncBound'.@@ -148,8 +148,16 @@   => m a   -> (Async (StM m a) -> m b)   -> m b-withAsyncBound = withAsyncUsing asyncBound+withAsyncBound = liftWithAsync A.withAsyncBound {-# INLINABLE withAsyncBound #-}++liftWithAsync+  :: MonadBaseControl IO m+  => (IO (StM m a) -> (Async (StM m a) -> IO (StM m b)) -> IO (StM m b))+  -> (m a -> (Async (StM m a) -> m b) -> m b)+liftWithAsync withA action cont = restoreM =<< do+  liftBaseWith $ \runInIO -> do+    withA (runInIO action) (runInIO . cont)  -- | Generalized version of 'A.withAsyncOn'. withAsyncOn