packages feed

distributed-process-extras 0.3.8 → 0.3.9

raw patch · 7 files changed

+39/−75 lines, 7 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −HUnitdep −QuickCheckdep −ansi-terminaldep ~containersdep ~deepseqdep ~hashablePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: tasty, tasty-hunit, tasty-quickcheck

Dependencies removed: HUnit, QuickCheck, ansi-terminal, bytestring, data-accessor, distributed-static, ghc-prim, mtl, network, test-framework, test-framework-hunit, test-framework-quickcheck2, transformers

Dependency ranges changed: containers, deepseq, hashable, stm, time

API changes (from Hackage documentation)

- Control.Distributed.Process.Extras: killProc :: Killable p => p -> String -> Process ()
+ Control.Distributed.Process.Extras: killProc :: (Killable p, Resolvable p) => p -> String -> Process ()
- Control.Distributed.Process.Extras: linkTo :: Linkable a => a -> Process ()
+ Control.Distributed.Process.Extras: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras: unresolvableMessage :: Resolvable a => a -> String
+ Control.Distributed.Process.Extras: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Call: multicall :: (Serializable a, Serializable b) => [ProcessId] -> a -> Tag -> Timeout -> Process [Maybe b]
+ Control.Distributed.Process.Extras.Call: multicall :: forall a b. (Serializable a, Serializable b) => [ProcessId] -> a -> Tag -> Timeout -> Process [Maybe b]
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: filter :: Insertable k => (v -> Bool) -> MultiMap k v -> MultiMap k v
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: filter :: forall k v. Insertable k => (v -> Bool) -> MultiMap k v -> MultiMap k v
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: filterWithKey :: Insertable k => (k -> v -> Bool) -> MultiMap k v -> MultiMap k v
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: filterWithKey :: forall k v. Insertable k => (k -> v -> Bool) -> MultiMap k v -> MultiMap k v
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: insert :: (Insertable k, Insertable v) => k -> v -> MultiMap k v -> MultiMap k v
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: insert :: forall k v. (Insertable k, Insertable v) => k -> v -> MultiMap k v -> MultiMap k v
- Control.Distributed.Process.Extras.Internal.Primitives: killProc :: Killable p => p -> String -> Process ()
+ Control.Distributed.Process.Extras.Internal.Primitives: killProc :: (Killable p, Resolvable p) => p -> String -> Process ()
- Control.Distributed.Process.Extras.Internal.Primitives: linkTo :: Linkable a => a -> Process ()
+ Control.Distributed.Process.Extras.Internal.Primitives: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras.Internal.Primitives: unresolvableMessage :: Resolvable a => a -> String
+ Control.Distributed.Process.Extras.Internal.Primitives: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Internal.Types: killProc :: Killable p => p -> String -> Process ()
+ Control.Distributed.Process.Extras.Internal.Types: killProc :: (Killable p, Resolvable p) => p -> String -> Process ()
- Control.Distributed.Process.Extras.Internal.Types: linkTo :: Linkable a => a -> Process ()
+ Control.Distributed.Process.Extras.Internal.Types: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras.Internal.Types: unresolvableMessage :: Resolvable a => a -> String
+ Control.Distributed.Process.Extras.Internal.Types: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Internal.Unsafe: newInputStream :: Typeable a => Either (ReceivePort a) (STM a) -> InputStream a
+ Control.Distributed.Process.Extras.Internal.Unsafe: newInputStream :: forall a. Typeable a => Either (ReceivePort a) (STM a) -> InputStream a
- Control.Distributed.Process.Extras.SystemLog: toLog :: ToLog m => m -> Process (LogLevel -> LogMessage)
+ Control.Distributed.Process.Extras.SystemLog: toLog :: (ToLog m, Serializable m) => m -> Process (LogLevel -> LogMessage)

Files

ChangeLog view
@@ -1,3 +1,8 @@+2025-02-04 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.3.9++* Ported test suite to use `tasty` rather than `test-framework`.+* Addressed some compilation warnings (#467).+ 2024-10-30  David Simmons-Duffin <dsd@caltech.edu> 0.3.8  * Bump dependency bound for ansi-terminal
distributed-process-extras.cabal view
@@ -1,6 +1,6 @@ cabal-version:  3.0 name:           distributed-process-extras-version:        0.3.8+version:        0.3.9 build-type:     Simple license:        BSD-3-Clause license-file:   LICENCE@@ -14,7 +14,7 @@ description:    Supporting library, providing common types and utilities used by the                 various libraries built on top of distributed-process category:       Control-tested-with:    GHC==8.10.7 GHC==9.0.2 GHC==9.2.8 GHC==9.4.5 GHC==9.6.4 GHC==9.8.2 GHC==9.10.1+tested-with:    GHC==8.10.7 GHC==9.0.2 GHC==9.2.8 GHC==9.4.5 GHC==9.6.4 GHC==9.8.2 GHC==9.10.1 GHC==9.12.1 extra-doc-files: ChangeLog  source-repository head@@ -31,6 +31,7 @@                  -Wredundant-constraints                  -fhide-source-paths                  -Wpartial-fields+                 -Wunused-packages  library   import:          warnings@@ -38,14 +39,12 @@                    distributed-process >= 0.6.0 && < 0.8,                    binary >= 0.8 && < 0.9,                    deepseq >= 1.4 && < 1.7,-                   mtl >= 2.0 && < 2.4,                    containers >= 0.6 && < 0.8,                    exceptions >= 0.10,                    hashable >= 1.2.0.5 && < 1.6,                    unordered-containers >= 0.2.3.0 && < 0.3,                    fingertree < 0.2,                    stm >= 2.4 && < 2.6,-                   transformers >= 0.2 && < 0.7,                    time >= 1.5   other-extensions: ExistentialQuantification   HS-Source-Dirs:    src@@ -72,16 +71,10 @@   x-uses-tf:       true   build-depends:                    base >= 4.14 && < 5,-                   ansi-terminal >= 0.5 && < 1.2,-                   distributed-process >= 0.6.0 && < 0.8,                    distributed-process-extras,-                   distributed-process-systest ^>= 0.4,-                   HUnit >= 1.2 && < 2,-                   test-framework >= 0.6 && < 0.9,-                   test-framework-hunit,-                   QuickCheck >= 2.4,-                   test-framework-quickcheck2,-                   ghc-prim+                   tasty >= 1.5 && <1.6,+                   tasty-hunit >=0.10 && <0.11,+                   tasty-quickcheck >=0.11 && <0.12   hs-source-dirs:  tests   ghc-options:     -rtsopts   main-is:         TestQueues.hs@@ -94,22 +87,13 @@   x-uses-tf:       true   build-depends:                    base >= 4.14 && < 5,-                   ansi-terminal >= 0.5 && < 1.2,                    distributed-process >= 0.6.0 && < 0.8,                    distributed-process-extras,                    distributed-process-systest ^>= 0.4,                    network-transport >= 0.4 && < 0.6,-                   mtl,-                   containers,                    network-transport-tcp >= 0.4 && < 0.9,-                   binary >= 0.8 && < 0.9,-                   deepseq,-                   network >= 2.3 && < 3.3,-                   HUnit >= 1.2 && < 2,-                   stm,-                   test-framework >= 0.6 && < 0.9,-                   test-framework-hunit,-                   transformers+                   tasty >= 1.5 && <1.6,+                   tasty-hunit >=0.10 && <0.11,   hs-source-dirs:  tests   ghc-options:     -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind   main-is:         TestPrimitives.hs@@ -121,19 +105,14 @@   x-uses-tf:       true   build-depends:                    base >= 4.14 && < 5,-                   ansi-terminal >= 0.5 && < 1.2,                    deepseq,                    distributed-process >= 0.6.0 && < 0.8,                    distributed-process-extras,                    distributed-process-systest ^>= 0.4,                    network-transport >= 0.4 && < 0.6,                    network-transport-tcp >= 0.4 && < 0.9,-                   HUnit >= 1.2 && < 2,-                   test-framework >= 0.6 && < 0.9,-                   test-framework-hunit,-                   QuickCheck >= 2.4,-                   test-framework-quickcheck2,-                   ghc-prim+                   tasty >= 1.5 && <1.6,+                   tasty-hunit >=0.10 && <0.11,   hs-source-dirs:  tests   ghc-options:     -rtsopts   main-is:         TestTimer.hs@@ -146,30 +125,14 @@ --  x-uses-tf:       true   build-depends:                    base >= 4.14 && < 5,-                   ansi-terminal >= 0.5 && < 1.2,-                   containers,-                   hashable,-                   unordered-containers >= 0.2.3.0 && < 0.3,                    distributed-process >= 0.6.0 && < 0.8,                    distributed-process-extras,                    distributed-process-systest ^>= 0.4,-                   distributed-static,-                   bytestring,-                   data-accessor,-                   fingertree < 0.2,                    network-transport >= 0.4 && < 0.6,-                   deepseq,-                   mtl,                    network-transport-tcp >= 0.4 && < 0.9,-                   binary >= 0.8 && < 0.9,-                   network >= 2.3 && < 3.3,-                   HUnit >= 1.2 && < 2,                    stm,-                   time > 1.4 && < 1.15,-                   test-framework >= 0.6 && < 0.9,-                   test-framework-hunit,-                   transformers,-                   ghc-prim+                   tasty >= 1.5 && <1.6,+                   tasty-hunit >=0.10 && <0.11,   hs-source-dirs:  tests   ghc-options:     -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind   main-is:         TestLog.hs
src/Control/Distributed/Process/Extras/Internal/Containers/MultiMap.hs view
@@ -21,13 +21,11 @@  import qualified Data.Foldable as Foldable import Data.Foldable (Foldable)- import Data.Hashable import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as Map import Data.HashSet (HashSet) import qualified Data.HashSet as Set-import Data.Foldable (Foldable(foldr)) import Prelude hiding (lookup, filter, pred)  -- | Class of things that can be inserted in a map or
tests/TestLog.hs view
@@ -21,8 +21,8 @@  import Prelude hiding (drop, read, Read) -import Test.Framework (Test, testGroup, defaultMain)-import Test.Framework.Providers.HUnit (testCase)+import Test.Tasty (TestTree, testGroup, defaultMain)+import Test.Tasty.HUnit (testCase) import Network.Transport.TCP import qualified Network.Transport as NT @@ -98,7 +98,7 @@          lift P.skipSpaces          return x -tests :: NT.Transport  -> IO [Test]+tests :: NT.Transport  -> IO TestTree tests transport = do   let ch = logChannel   localNode <- newLocalNode transport $ __remoteTable initRemoteTable@@ -107,7 +107,7 @@   void $ forkProcess localNode $ do (_, chan) <- testLoggingProcess                                     liftIO $ putMVar ex chan   chan <- takeMVar ex-  return [+  return $ testGroup "TestLog" [       testGroup "Log Reports / LogText"         (map (mkTestCase lock chan ch simpleShowToLog localNode) (enumFromTo Debug Emergency))     , testGroup "Logging Raw Messages"@@ -126,7 +126,7 @@     messageRaw      = unsafeWrapMessage  -- | Given a @builder@ function, make and run a test suite on a single transport-testMain :: (NT.Transport -> IO [Test]) -> IO ()+testMain :: (NT.Transport -> IO TestTree) -> IO () testMain builder = do   Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters   testData <- builder transport
tests/TestPrimitives.hs view
@@ -18,9 +18,8 @@ import Control.Monad (void) import Network.Transport.TCP() -import Test.HUnit (Assertion, assertEqual, assertBool)-import Test.Framework (Test, testGroup, defaultMain)-import Test.Framework.Providers.HUnit (testCase)+import Test.Tasty (TestTree, testGroup, defaultMain)+import Test.Tasty.HUnit (Assertion, assertEqual, assertBool, testCase) import Network.Transport.TCP import qualified Network.Transport as NT import Control.Distributed.Process.SysTest.Utils@@ -178,8 +177,8 @@ -- Utilities and Plumbing                                                     -- -------------------------------------------------------------------------------- -tests :: NT.Transport -> LocalNode  -> [Test]-tests transport localNode = [+tests :: NT.Transport -> LocalNode  -> TestTree+tests transport localNode = testGroup "TestPrimitives" [     testGroup "Linking Tests" [         testCase "testLinkingWithNormalExits"                  (delayedAssertion@@ -202,14 +201,14 @@     --   ]   ] -primitivesTests :: NT.Transport -> IO [Test]+primitivesTests :: NT.Transport -> IO TestTree primitivesTests transport = do   localNode <- newLocalNode transport initRemoteTable   let testData = tests transport localNode   return testData  -- | Given a @builder@ function, make and run a test suite on a single transport-testMain :: (NT.Transport -> IO [Test]) -> IO ()+testMain :: (NT.Transport -> IO TestTree) -> IO () testMain builder = do   Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters   testData <- builder transport
tests/TestQueues.hs view
@@ -8,10 +8,9 @@  import Data.Function (on) import Data.List ( sortBy )-import Test.Framework as TF (defaultMain, testGroup, Test)-import Test.Framework.Providers.HUnit-import Test.Framework.Providers.QuickCheck2 (testProperty)-import Test.HUnit (assertBool, assertEqual)+import Test.Tasty (TestTree, testGroup, defaultMain)+import Test.Tasty.HUnit (assertEqual, assertBool, testCase)+import Test.Tasty.QuickCheck (testProperty)  import Prelude @@ -50,8 +49,8 @@       Just (_, q') = FIFO.dequeue q   in (FIFO.isEmpty q') == ((FIFO.isEmpty q) == False) -tests :: [TF.Test]-tests = [+tests :: TestTree+tests = testGroup "TestQueues" [      testGroup "Priority Queue Tests" [         -- testCase "New Queue Should Be Empty"         --   (expect (PQ.isEmpty $ PQ.empty) $ equalTo True),
tests/TestTimer.hs view
@@ -18,8 +18,8 @@ import Control.Distributed.Process.Extras.Timer import Control.Distributed.Process.SysTest.Utils -import Test.Framework (Test, testGroup, defaultMain)-import Test.Framework.Providers.HUnit (testCase)+import Test.Tasty (TestTree, testGroup, defaultMain)+import Test.Tasty.HUnit (testCase) import Network.Transport.TCP import qualified Network.Transport as NT @@ -139,8 +139,8 @@ -- Utilities and Plumbing                                                     -- -------------------------------------------------------------------------------- -tests :: LocalNode  -> [Test]-tests localNode = [+tests :: LocalNode  -> TestTree+tests localNode = testGroup "TestTimer" [     testGroup "Timer Tests" [         testCase "testSendAfter"                  (delayedAssertion@@ -173,14 +173,14 @@       ]   ] -timerTests :: NT.Transport -> IO [Test]+timerTests :: NT.Transport -> IO TestTree timerTests transport = do   localNode <- newLocalNode transport initRemoteTable   let testData = tests localNode   return testData  -- | Given a @builder@ function, make and run a test suite on a single transport-testMain :: (NT.Transport -> IO [Test]) -> IO ()+testMain :: (NT.Transport -> IO TestTree) -> IO () testMain builder = do   Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters   testData <- builder transport