packages feed

lifted-async 0.10.2.7 → 0.11.0

raw patch · 8 files changed

+18/−58 lines, 8 filesdep −HUnitdep −deepseqdep ~asyncdep ~basedep ~constraintsPVP ok

version bump matches the API change (PVP)

Dependencies removed: HUnit, deepseq

Dependency ranges changed: async, base, constraints, monad-control

API changes (from Hackage documentation)

- Control.Concurrent.Async.Lifted: Concurrently :: m a -> Concurrently m a
+ Control.Concurrent.Async.Lifted: Concurrently :: m a -> Concurrently (m :: Type -> Type) a
- Control.Concurrent.Async.Lifted: [runConcurrently] :: Concurrently m a -> m a
+ Control.Concurrent.Async.Lifted: [runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
- Control.Concurrent.Async.Lifted: asyncOnWithUnmask :: MonadBaseControl IO m => Int -> ((forall b. m b -> m b) -> m a) -> m (Async (StM m a))
+ Control.Concurrent.Async.Lifted: asyncOnWithUnmask :: MonadBaseControl IO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async (StM m a))
- Control.Concurrent.Async.Lifted: asyncWithUnmask :: MonadBaseControl IO m => ((forall b. m b -> m b) -> m a) -> m (Async (StM m a))
+ Control.Concurrent.Async.Lifted: asyncWithUnmask :: MonadBaseControl IO m => ((forall b. () => m b -> m b) -> m a) -> m (Async (StM m a))
- Control.Concurrent.Async.Lifted: data () => Async a
+ Control.Concurrent.Async.Lifted: data Async a
- Control.Concurrent.Async.Lifted: data () => AsyncCancelled
+ Control.Concurrent.Async.Lifted: data AsyncCancelled
- Control.Concurrent.Async.Lifted: data () => ExceptionInLinkedThread
+ Control.Concurrent.Async.Lifted: data ExceptionInLinkedThread
- Control.Concurrent.Async.Lifted: newtype Concurrently m a
+ Control.Concurrent.Async.Lifted: newtype Concurrently (m :: Type -> Type) a
- Control.Concurrent.Async.Lifted: withAsyncOnWithUnmask :: MonadBaseControl IO m => Int -> ((forall c. m c -> m c) -> m a) -> (Async (StM m a) -> m b) -> m b
+ Control.Concurrent.Async.Lifted: withAsyncOnWithUnmask :: MonadBaseControl IO m => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async (StM m a) -> m b) -> m b
- Control.Concurrent.Async.Lifted: withAsyncWithUnmask :: MonadBaseControl IO m => ((forall c. m c -> m c) -> m a) -> (Async (StM m a) -> m b) -> m b
+ Control.Concurrent.Async.Lifted: withAsyncWithUnmask :: MonadBaseControl IO m => ((forall c. () => m c -> m c) -> m a) -> (Async (StM m a) -> m b) -> m b
- Control.Concurrent.Async.Lifted.Safe: [Concurrently] :: Forall (Pure m) => m a -> Concurrently m a
+ Control.Concurrent.Async.Lifted.Safe: [Concurrently] :: forall (m :: Type -> Type) a. Forall (Pure m) => m a -> Concurrently m a
- Control.Concurrent.Async.Lifted.Safe: async :: forall m a. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m (Async a)
+ Control.Concurrent.Async.Lifted.Safe: async :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m (Async a)
- Control.Concurrent.Async.Lifted.Safe: asyncBound :: forall m a. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m (Async a)
+ Control.Concurrent.Async.Lifted.Safe: asyncBound :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m (Async a)
- Control.Concurrent.Async.Lifted.Safe: asyncOn :: forall m a. (MonadBaseControl IO m, Forall (Pure m)) => Int -> m a -> m (Async a)
+ Control.Concurrent.Async.Lifted.Safe: asyncOn :: (MonadBaseControl IO m, Forall (Pure m)) => Int -> m a -> m (Async a)
- Control.Concurrent.Async.Lifted.Safe: asyncOnWithUnmask :: forall m a. (MonadBaseControl IO m, Forall (Pure m)) => Int -> ((forall b. m b -> m b) -> m a) -> m (Async a)
+ Control.Concurrent.Async.Lifted.Safe: asyncOnWithUnmask :: (MonadBaseControl IO m, Forall (Pure m)) => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
- Control.Concurrent.Async.Lifted.Safe: asyncWithUnmask :: forall m a. (MonadBaseControl IO m, Forall (Pure m)) => ((forall b. m b -> m b) -> m a) -> m (Async a)
+ Control.Concurrent.Async.Lifted.Safe: asyncWithUnmask :: (MonadBaseControl IO m, Forall (Pure m)) => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
- Control.Concurrent.Async.Lifted.Safe: class StM m a ~ a => Pure m a
+ Control.Concurrent.Async.Lifted.Safe: class StM m a ~ a => Pure (m :: Type -> Type) a
- Control.Concurrent.Async.Lifted.Safe: concurrently :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (a, b)
+ Control.Concurrent.Async.Lifted.Safe: concurrently :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (a, b)
- Control.Concurrent.Async.Lifted.Safe: concurrently_ :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m ()
+ Control.Concurrent.Async.Lifted.Safe: concurrently_ :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m ()
- Control.Concurrent.Async.Lifted.Safe: data () => Async a
+ Control.Concurrent.Async.Lifted.Safe: data Async a
- Control.Concurrent.Async.Lifted.Safe: data () => AsyncCancelled
+ Control.Concurrent.Async.Lifted.Safe: data AsyncCancelled
- Control.Concurrent.Async.Lifted.Safe: data Concurrently m a
+ Control.Concurrent.Async.Lifted.Safe: data Concurrently (m :: Type -> Type) a
- Control.Concurrent.Async.Lifted.Safe: data () => ExceptionInLinkedThread
+ Control.Concurrent.Async.Lifted.Safe: data ExceptionInLinkedThread
- Control.Concurrent.Async.Lifted.Safe: poll :: forall m a. (MonadBase IO m, Forall (Pure m)) => Async a -> m (Maybe (Either SomeException a))
+ Control.Concurrent.Async.Lifted.Safe: poll :: (MonadBase IO m, Forall (Pure m)) => Async a -> m (Maybe (Either SomeException a))
- Control.Concurrent.Async.Lifted.Safe: race :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (Either a b)
+ Control.Concurrent.Async.Lifted.Safe: race :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (Either a b)
- Control.Concurrent.Async.Lifted.Safe: race_ :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m ()
+ Control.Concurrent.Async.Lifted.Safe: race_ :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m ()
- Control.Concurrent.Async.Lifted.Safe: wait :: forall m a. (MonadBase IO m, Forall (Pure m)) => Async a -> m a
+ Control.Concurrent.Async.Lifted.Safe: wait :: (MonadBase IO m, Forall (Pure m)) => Async a -> m a
- Control.Concurrent.Async.Lifted.Safe: waitAny :: forall m a. (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, a)
+ Control.Concurrent.Async.Lifted.Safe: waitAny :: (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, a)
- Control.Concurrent.Async.Lifted.Safe: waitAnyCancel :: forall m a. (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, a)
+ Control.Concurrent.Async.Lifted.Safe: waitAnyCancel :: (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, a)
- Control.Concurrent.Async.Lifted.Safe: waitAnyCatch :: forall m a. (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, Either SomeException a)
+ Control.Concurrent.Async.Lifted.Safe: waitAnyCatch :: (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, Either SomeException a)
- Control.Concurrent.Async.Lifted.Safe: waitAnyCatchCancel :: forall m a. (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, Either SomeException a)
+ Control.Concurrent.Async.Lifted.Safe: waitAnyCatchCancel :: (MonadBase IO m, Forall (Pure m)) => [Async a] -> m (Async a, Either SomeException a)
- Control.Concurrent.Async.Lifted.Safe: waitBoth :: forall m a b. (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (a, b)
+ Control.Concurrent.Async.Lifted.Safe: waitBoth :: (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (a, b)
- Control.Concurrent.Async.Lifted.Safe: waitCatch :: forall m a. (MonadBase IO m, Forall (Pure m)) => Async a -> m (Either SomeException a)
+ Control.Concurrent.Async.Lifted.Safe: waitCatch :: (MonadBase IO m, Forall (Pure m)) => Async a -> m (Either SomeException a)
- Control.Concurrent.Async.Lifted.Safe: waitEither :: forall m a b. (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either a b)
+ Control.Concurrent.Async.Lifted.Safe: waitEither :: (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either a b)
- Control.Concurrent.Async.Lifted.Safe: waitEitherCancel :: forall m a b. (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either a b)
+ Control.Concurrent.Async.Lifted.Safe: waitEitherCancel :: (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either a b)
- Control.Concurrent.Async.Lifted.Safe: waitEitherCatch :: forall m a b. (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
+ Control.Concurrent.Async.Lifted.Safe: waitEitherCatch :: (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
- Control.Concurrent.Async.Lifted.Safe: waitEitherCatchCancel :: forall m a b. (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
+ Control.Concurrent.Async.Lifted.Safe: waitEitherCatchCancel :: (MonadBase IO m, Forall (Pure m)) => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
- Control.Concurrent.Async.Lifted.Safe: withAsync :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> (Async a -> m b) -> m b
+ Control.Concurrent.Async.Lifted.Safe: withAsync :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> (Async a -> m b) -> m b
- Control.Concurrent.Async.Lifted.Safe: withAsyncBound :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => m a -> (Async a -> m b) -> m b
+ Control.Concurrent.Async.Lifted.Safe: withAsyncBound :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> (Async a -> m b) -> m b
- Control.Concurrent.Async.Lifted.Safe: withAsyncOn :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => Int -> m a -> (Async a -> m b) -> m b
+ Control.Concurrent.Async.Lifted.Safe: withAsyncOn :: (MonadBaseControl IO m, Forall (Pure m)) => Int -> m a -> (Async a -> m b) -> m b
- Control.Concurrent.Async.Lifted.Safe: withAsyncOnWithUnmask :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => Int -> ((forall c. m c -> m c) -> m a) -> (Async a -> m b) -> m b
+ Control.Concurrent.Async.Lifted.Safe: withAsyncOnWithUnmask :: (MonadBaseControl IO m, Forall (Pure m)) => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
- Control.Concurrent.Async.Lifted.Safe: withAsyncWithUnmask :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) => ((forall c. m c -> m c) -> m a) -> (Async a -> m b) -> m b
+ Control.Concurrent.Async.Lifted.Safe: withAsyncWithUnmask :: (MonadBaseControl IO m, Forall (Pure m)) => ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for lifted-async +## v0.11.0 - 2025-09-06++* Drop support for GHC 7 and allow base-4.22 ([#47](https://github.com/maoe/lifted-async/pull/47))+ ## v0.10.2.7 - 2024-11-03  * Allow base-4.21, tasty-bench-0.4, bump Haskell CI to GHC 9.12.0 ([#46](https://github.com/maoe/lifted-async/pull/46))
lifted-async.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.24 name:                lifted-async-version:             0.10.2.7+version:             0.11.0 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@@ -8,14 +8,15 @@ license-file:        LICENSE author:              Mitsutoshi Aoe maintainer:          Mitsutoshi Aoe <me@maoe.name>-copyright:           Copyright (C) 2012-2024 Mitsutoshi Aoe+copyright:           Copyright (C) 2012-2025 Mitsutoshi Aoe category:            Concurrency build-type:          Simple tested-with:-  GHC == 9.12.0-  GHC == 9.10.1-  GHC == 9.8.2-  GHC == 9.6.6+  GHC == 9.14.1+  GHC == 9.12.2+  GHC == 9.10.2+  GHC == 9.8.4+  GHC == 9.6.7   GHC == 9.4.8   GHC == 9.2.8   GHC == 9.0.2@@ -35,21 +36,18 @@   instance of 'MonadBase' or 'MonadBaseControl'.  library+  hs-source-dirs: src   exposed-modules:     Control.Concurrent.Async.Lifted     Control.Concurrent.Async.Lifted.Safe   build-depends:-      base >= 4.5 && < 4.22+      base >= 4.9 && < 4.23     , async >= 2.2 && < 2.3     , lifted-base >= 0.2 && < 0.3     , transformers-base >= 0.4 && < 0.5     , monad-control == 1.0.*-  if impl(ghc >= 7.8)-    build-depends: constraints >= 0.2 && < 0.15-  else-    build-depends: constraints >= 0.2 && < 0.6+    , constraints >= 0.2 && < 0.15   ghc-options: -Wall-  hs-source-dirs: src   default-language: Haskell2010  test-suite test-lifted-async@@ -64,10 +62,8 @@   ghc-options: -Wall -threaded   build-depends:       base-    , HUnit     , lifted-async     , lifted-base-    , monad-control     , mtl     , tasty     , tasty-expected-failure < 0.13@@ -82,9 +78,7 @@   ghc-options: -Wall -threaded   build-depends:       base-    , async     , lifted-async-    , mtl     , tasty-hunit >= 0.9 && < 0.11     , tasty-th   default-language: Haskell2010@@ -98,7 +92,6 @@       base     , async     , tasty-bench < 0.5-    , deepseq     , lifted-async   default-language: Haskell2010 @@ -111,7 +104,6 @@       base     , async     , tasty-bench < 0.5-    , deepseq     , lifted-async   default-language: Haskell2010 
src/Control/Concurrent/Async/Lifted.hs view
@@ -86,13 +86,7 @@ import qualified Control.Concurrent.Async as A import qualified Control.Exception.Lifted as E -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 710-import Data.Foldable-import Data.Traversable-#endif-#if !MIN_VERSION_base(4, 8, 0)-import Data.Monoid (Monoid(mappend, mempty))-#elif MIN_VERSION_base(4, 9, 0) && !MIN_VERSION_base(4, 13, 0)+#if !MIN_VERSION_base(4, 11, 0) import Data.Semigroup (Semigroup((<>))) #endif @@ -460,7 +454,6 @@   Concurrently as <|> Concurrently bs =     Concurrently $ either id id <$> race as bs -#if MIN_VERSION_base(4, 9, 0) instance (MonadBaseControl IO m, Semigroup a) =>   Semigroup (Concurrently m a) where     (<>) = liftA2 (<>)@@ -469,11 +462,6 @@   Monoid (Concurrently m a) where     mempty = pure mempty     mappend = (<>)-#else-instance (MonadBaseControl IO m, Monoid a) => Monoid (Concurrently m a) where-  mempty = pure mempty-  mappend = liftA2 mappend-#endif  sequenceEither :: MonadBaseControl IO m => Either e (StM m a) -> m (Either e a) sequenceEither = either (return . Left) (fmap Right . restoreM)
src/Control/Concurrent/Async/Lifted/Safe.hs view
@@ -92,13 +92,7 @@  import qualified Control.Concurrent.Async.Lifted as Unsafe -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 710-import Data.Foldable-import Data.Traversable-#endif-#if !MIN_VERSION_base(4, 8, 0)-import Data.Monoid (Monoid(mappend, mempty))-#elif MIN_VERSION_base(4, 9, 0) && !MIN_VERSION_base(4, 13, 0)+#if !MIN_VERSION_base(4, 11, 0) import Data.Semigroup (Semigroup((<>))) #endif @@ -438,7 +432,6 @@         \\ (inst :: Forall (Pure m) :- Pure m a)         \\ (inst :: Forall (Pure m) :- Pure m b) -#if MIN_VERSION_base(4, 9, 0) instance (MonadBaseControl IO m, Semigroup a, Forall (Pure m)) =>   Semigroup (Concurrently m a) where     (<>) = liftA2 (<>)@@ -447,9 +440,3 @@   Monoid (Concurrently m a) where     mempty = pure mempty     mappend = (<>)-#else-instance (MonadBaseControl IO m, Monoid a, Forall (Pure m)) =>-  Monoid (Concurrently m a) where-    mempty = pure mempty-    mappend = liftA2 mappend-#endif
tests/Test/Async/Common.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} module Test.Async.Common   ( value@@ -6,8 +5,6 @@   , module X   ) where -import Data.Typeable- import Control.Exception.Lifted import Test.Tasty as X import Test.Tasty.HUnit as X@@ -17,6 +14,6 @@ value = 42  data TestException = TestException-  deriving (Eq, Show, Typeable)+  deriving (Eq, Show)  instance Exception TestException
tests/Test/Async/IO.hs view
@@ -9,11 +9,7 @@ import Control.Concurrent.Lifted import Control.Exception.Lifted as E -#if MIN_VERSION_monad_control(1, 0, 0) import Control.Concurrent.Async.Lifted.Safe-#else-import Control.Concurrent.Async.Lifted-#endif import Test.Async.Common  ioTestGroup :: TestTree
tests/Test/Async/Reader.hs view
@@ -11,11 +11,7 @@ import Control.Exception.Lifted as E import Test.Tasty.ExpectedFailure -#if MIN_VERSION_monad_control(1, 0, 0) import Control.Concurrent.Async.Lifted.Safe-#else-import Control.Concurrent.Async.Lifted-#endif import Test.Async.Common  readerTestGroup :: TestTree
tests/TestSuite.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ScopedTypeVariables,DeriveDataTypeable #-}+{-# LANGUAGE ScopedTypeVariables #-} module Main where import Test.Tasty (defaultMain, testGroup)