distributed-process-extras 0.3.5 → 0.3.6
raw patch · 7 files changed
+101/−111 lines, 7 filesdep −old-localedep ~basedep ~binarydep ~containerssetup-changednew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: old-locale
Dependency ranges changed: base, binary, containers, deepseq, distributed-process-systest, exceptions, hashable, network, network-transport-tcp, stm, time, transformers
API changes (from Hackage documentation)
- Control.Distributed.Process.Extras: linkTo :: (Linkable a, (Resolvable a)) => a -> Process ()
+ Control.Distributed.Process.Extras: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras: matchCond :: (Serializable a) => (a -> Maybe (Process b)) -> Match b
+ Control.Distributed.Process.Extras: matchCond :: Serializable a => (a -> Maybe (Process b)) -> Match b
- Control.Distributed.Process.Extras: unresolvableMessage :: (Resolvable a, (Resolvable a)) => a -> String
+ Control.Distributed.Process.Extras: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: delete :: (Insertable k) => k -> MultiMap k v -> Maybe ([v], MultiMap k v)
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: delete :: Insertable k => k -> MultiMap k v -> Maybe ([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: filter :: forall k v. Insertable 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: filterWithKey :: forall k v. Insertable k => (k -> v -> Bool) -> MultiMap k v -> MultiMap k v
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: lookup :: (Insertable k) => k -> MultiMap k v -> Maybe [v]
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: lookup :: Insertable k => k -> MultiMap k v -> Maybe [v]
- Control.Distributed.Process.Extras.Internal.Containers.MultiMap: member :: (Insertable k) => k -> MultiMap k a -> Bool
+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap: member :: Insertable k => k -> MultiMap k a -> Bool
- Control.Distributed.Process.Extras.Internal.Primitives: linkTo :: (Linkable a, (Resolvable a)) => a -> Process ()
+ Control.Distributed.Process.Extras.Internal.Primitives: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras.Internal.Primitives: matchCond :: (Serializable a) => (a -> Maybe (Process b)) -> Match b
+ Control.Distributed.Process.Extras.Internal.Primitives: matchCond :: Serializable a => (a -> Maybe (Process b)) -> Match b
- Control.Distributed.Process.Extras.Internal.Primitives: unresolvableMessage :: (Resolvable a, (Resolvable a)) => a -> String
+ Control.Distributed.Process.Extras.Internal.Primitives: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Internal.Types: linkTo :: (Linkable a, (Resolvable a)) => a -> Process ()
+ Control.Distributed.Process.Extras.Internal.Types: linkTo :: (Linkable a, Resolvable a) => a -> Process ()
- Control.Distributed.Process.Extras.Internal.Types: resolveOrDie :: (Resolvable a) => a -> String -> Process ProcessId
+ Control.Distributed.Process.Extras.Internal.Types: resolveOrDie :: Resolvable a => a -> String -> Process ProcessId
- Control.Distributed.Process.Extras.Internal.Types: unresolvableMessage :: (Resolvable a, (Resolvable a)) => a -> String
+ Control.Distributed.Process.Extras.Internal.Types: unresolvableMessage :: (Resolvable a, Resolvable a) => a -> String
- Control.Distributed.Process.Extras.Internal.Unsafe: matchChanP :: (Typeable m) => ReceivePort (PCopy m) -> Match m
+ Control.Distributed.Process.Extras.Internal.Unsafe: matchChanP :: Typeable m => ReceivePort (PCopy m) -> Match m
- Control.Distributed.Process.Extras.Internal.Unsafe: matchP :: (Typeable m) => Match (Maybe m)
+ Control.Distributed.Process.Extras.Internal.Unsafe: matchP :: Typeable m => Match (Maybe m)
- Control.Distributed.Process.Extras.Internal.Unsafe: newInputStream :: forall a. (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.Internal.Unsafe: pCopy :: (Typeable a) => a -> PCopy a
+ Control.Distributed.Process.Extras.Internal.Unsafe: pCopy :: Typeable a => a -> PCopy a
- Control.Distributed.Process.Extras.Internal.Unsafe: pUnwrap :: (Typeable m) => Message -> Process (Maybe m)
+ Control.Distributed.Process.Extras.Internal.Unsafe: pUnwrap :: Typeable m => Message -> Process (Maybe m)
- Control.Distributed.Process.Extras.Internal.Unsafe: readInputStream :: (Serializable a) => InputStream a -> Process a
+ Control.Distributed.Process.Extras.Internal.Unsafe: readInputStream :: Serializable a => InputStream a -> Process a
- Control.Distributed.Process.Extras.SystemLog: addFormatter :: (Addressable r) => r -> Closure (Message -> Process (Maybe String)) -> Process ()
+ Control.Distributed.Process.Extras.SystemLog: addFormatter :: Addressable r => r -> Closure (Message -> Process (Maybe String)) -> Process ()
- Control.Distributed.Process.Extras.SystemLog: report :: (Logger l) => (l -> LogText -> Process ()) -> l -> String -> Process ()
+ Control.Distributed.Process.Extras.SystemLog: report :: Logger l => (l -> LogText -> Process ()) -> l -> String -> Process ()
- Control.Distributed.Process.Extras.SystemLog: systemLog :: (String -> Process ()) -> (Process ()) -> LogLevel -> LogFormat -> Process ProcessId
+ Control.Distributed.Process.Extras.SystemLog: systemLog :: (String -> Process ()) -> Process () -> LogLevel -> LogFormat -> Process ProcessId
- Control.Distributed.Process.Extras.SystemLog: toLog :: (ToLog m, (Serializable m)) => m -> Process (LogLevel -> LogMessage)
+ Control.Distributed.Process.Extras.SystemLog: toLog :: (ToLog m, Serializable m) => m -> Process (LogLevel -> LogMessage)
- Control.Distributed.Process.Extras.Timer: exitAfter :: (Serializable a) => TimeInterval -> ProcessId -> a -> Process TimerRef
+ Control.Distributed.Process.Extras.Timer: exitAfter :: Serializable a => TimeInterval -> ProcessId -> a -> Process TimerRef
- Control.Distributed.Process.Extras.Timer: sendAfter :: (NFSerializable a) => TimeInterval -> ProcessId -> a -> Process TimerRef
+ Control.Distributed.Process.Extras.Timer: sendAfter :: NFSerializable a => TimeInterval -> ProcessId -> a -> Process TimerRef
- Control.Distributed.Process.Extras.Timer: startTimer :: (NFSerializable a) => TimeInterval -> ProcessId -> a -> Process TimerRef
+ Control.Distributed.Process.Extras.Timer: startTimer :: NFSerializable a => TimeInterval -> ProcessId -> a -> Process TimerRef
- Control.Distributed.Process.Extras.UnsafePrimitives: sendChan :: (NFSerializable m) => SendPort m -> m -> Process ()
+ Control.Distributed.Process.Extras.UnsafePrimitives: sendChan :: NFSerializable m => SendPort m -> m -> Process ()
Files
- ChangeLog +5/−0
- Setup.lhs +0/−3
- distributed-process-extras.cabal +81/−80
- src/Control/Distributed/Process/Extras/SystemLog.hs +1/−4
- tests/TestLog.hs +2/−6
- tests/TestPrimitives.hs +9/−11
- tests/TestTimer.hs +3/−7
ChangeLog view
@@ -1,3 +1,8 @@+2024-09-03 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.3.6++* Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1+* Updated links to point to Distributed Haskell monorepo+ 2017-06-13 Alexander Vershilov <alexander.vershilov@gmail.com> 0.3.5 * Bump dependencies * Cleanup code
− Setup.lhs
@@ -1,3 +0,0 @@-#!/usr/bin/env runhaskell-> import Distribution.Simple-> main = defaultMain
distributed-process-extras.cabal view
@@ -1,79 +1,81 @@+cabal-version: 3.0 name: distributed-process-extras-version: 0.3.5-cabal-version: >=1.8+version: 0.3.6 build-type: Simple-license: BSD3+license: BSD-3-Clause license-file: LICENCE stability: experimental Copyright: Tim Watson 2012 - 2017 Author: Tim Watson-Maintainer: Tim Watson <watson.timothy@gmail.com>-Homepage: http://github.com/haskell-distributed/distributed-process-extras-Bug-Reports: http://github.com/haskell-distributed/distributed-process-extras/issues+maintainer: The Distributed Haskell team+Homepage: http://github.com/haskell-distributed/distributed-process+Bug-Reports: http://github.com/haskell-distributed/distributed-process/issues synopsis: Cloud Haskell Extras description: Supporting library, providing common types and utilities used by the various libraries built on top of distributed-process category: Control-Tested-With: GHC==7.10.3 GHC==8.0.1 GHC==8.0.2-data-dir: ""-extra-source-files: ChangeLog+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+extra-doc-files: ChangeLog source-repository head- type: git- location: https://github.com/haskell-distributed/distributed-process-extras+ Type: git+ Location: https://github.com/haskell-distributed/distributed-process+ SubDir: packages/distributed-process-extras -flag old-locale- description: If false then depend on time >= 1.5.- .- If true then depend on time < 1.5 together with old-locale.- default: False+common warnings+ ghc-options: -Wall+ -Wcompat+ -Widentities+ -Wincomplete-uni-patterns+ -Wincomplete-record-updates+ -Wredundant-constraints+ -fhide-source-paths+ -Wpartial-fields library- build-depends: base >= 4.8 && < 5,+ import: warnings+ build-depends: base >= 4.14 && < 5, distributed-process >= 0.6.0 && < 0.8,- binary >= 0.6.3.0 && < 0.9,- deepseq >= 1.3.0.1 && < 1.6,+ binary >= 0.8 && < 0.9,+ deepseq >= 1.4 && < 1.6, mtl >= 2.0 && < 2.4,- containers >= 0.4 && < 0.6,- exceptions >= 0.5,- hashable >= 1.2.0.5 && < 1.3,+ 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.5,- transformers >= 0.2 && < 0.6- if flag(old-locale)- Build-Depends: time < 1.5, old-locale >= 1.0 && <1.1- else- Build-Depends: time >= 1.5- extensions: CPP+ stm >= 2.4 && < 2.6,+ transformers >= 0.2 && < 0.7,+ time >= 1.5 other-extensions: ExistentialQuantification- ghc-options: -Wall HS-Source-Dirs: src exposed-modules:- Control.Distributed.Process.Extras,- Control.Distributed.Process.Extras.Call,- Control.Distributed.Process.Extras.Monitoring,- Control.Distributed.Process.Extras.SystemLog,- Control.Distributed.Process.Extras.Time,- Control.Distributed.Process.Extras.Timer,- Control.Distributed.Process.Extras.UnsafePrimitives,- Control.Concurrent.Utils,- Control.Distributed.Process.Extras.Internal.Containers.MultiMap,- Control.Distributed.Process.Extras.Internal.Primitives,- Control.Distributed.Process.Extras.Internal.Types,- Control.Distributed.Process.Extras.Internal.Queue.SeqQ,+ Control.Distributed.Process.Extras+ Control.Distributed.Process.Extras.Call+ Control.Distributed.Process.Extras.Monitoring+ Control.Distributed.Process.Extras.SystemLog+ Control.Distributed.Process.Extras.Time+ Control.Distributed.Process.Extras.Timer+ Control.Distributed.Process.Extras.UnsafePrimitives+ Control.Concurrent.Utils+ Control.Distributed.Process.Extras.Internal.Containers.MultiMap+ Control.Distributed.Process.Extras.Internal.Primitives+ Control.Distributed.Process.Extras.Internal.Types+ Control.Distributed.Process.Extras.Internal.Queue.SeqQ Control.Distributed.Process.Extras.Internal.Queue.PriorityQ Control.Distributed.Process.Extras.Internal.Unsafe+ default-language: Haskell2010 test-suite InternalQueueTests+ import: warnings type: exitcode-stdio-1.0 x-uses-tf: true build-depends:- base >= 4.6 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9, distributed-process >= 0.6.0 && < 0.8, distributed-process-extras,- distributed-process-systest >= 0.1.0 && < 0.3.0,+ distributed-process-systest >= 0.1.0 && < 0.4, HUnit >= 1.2 && < 2, test-framework >= 0.6 && < 0.9, test-framework-hunit,@@ -81,53 +83,53 @@ test-framework-quickcheck2, rematch >= 0.2.0.0, ghc-prim- hs-source-dirs:- tests- ghc-options: -Wall -rtsopts- extensions: CPP+ hs-source-dirs: tests+ ghc-options: -rtsopts main-is: TestQueues.hs cpp-options: -DTESTING+ default-language: Haskell2010 test-suite PrimitivesTests+ import: warnings type: exitcode-stdio-1.0 x-uses-tf: true build-depends:- base >= 4.6 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9, distributed-process >= 0.6.0 && < 0.8, distributed-process-extras,- distributed-process-systest >= 0.1.0 && < 0.3.0,+ distributed-process-systest >= 0.1.0 && < 0.4, network-transport >= 0.4 && < 0.6, mtl,- containers >= 0.4 && < 0.6,- network-transport-tcp >= 0.4 && < 0.6,- binary >= 0.6.3.0 && < 0.9,- deepseq >= 1.3.0.1 && < 1.6,- network >= 2.3 && < 2.7,+ containers,+ network-transport-tcp >= 0.4 && < 0.9,+ binary >= 0.8 && < 0.9,+ deepseq,+ network >= 2.3 && < 3.3, HUnit >= 1.2 && < 2,- stm >= 2.3 && < 2.5,+ stm, test-framework >= 0.6 && < 0.9, test-framework-hunit, rematch >= 0.2.0.0, transformers- hs-source-dirs:- tests- ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind- extensions: CPP+ hs-source-dirs: tests+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind main-is: TestPrimitives.hs+ default-language: Haskell2010 test-suite TimerTests+ import: warnings type: exitcode-stdio-1.0 x-uses-tf: true build-depends:- base >= 4.6 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9,- deepseq >= 1.3.0.1 && < 1.6,+ deepseq, distributed-process >= 0.6.0 && < 0.8, distributed-process-extras,- distributed-process-systest >= 0.1.0 && < 0.3.0,+ distributed-process-systest >= 0.1.0 && < 0.4, network-transport >= 0.4 && < 0.6,- network-transport-tcp >= 0.4 && < 0.6,+ network-transport-tcp >= 0.4 && < 0.9, HUnit >= 1.2 && < 2, test-framework >= 0.6 && < 0.9, test-framework-hunit,@@ -135,45 +137,44 @@ test-framework-quickcheck2, rematch >= 0.2.0.0, ghc-prim- hs-source-dirs:- tests- ghc-options: -Wall -rtsopts- extensions: CPP+ hs-source-dirs: tests+ ghc-options: -rtsopts main-is: TestTimer.hs cpp-options: -DTESTING+ default-language: Haskell2010 test-suite LoggerTests+ import: warnings type: exitcode-stdio-1.0 -- x-uses-tf: true build-depends:- base >= 4.6 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9, containers, hashable, unordered-containers >= 0.2.3.0 && < 0.3, distributed-process >= 0.6.0 && < 0.8, distributed-process-extras,- distributed-process-systest >= 0.1.0 && < 0.3.0,+ distributed-process-systest >= 0.1.0 && < 0.4, distributed-static, bytestring, data-accessor, fingertree < 0.2, network-transport >= 0.4 && < 0.6,- deepseq >= 1.3.0.1 && < 1.6,+ deepseq, mtl,- network-transport-tcp >= 0.4 && < 0.6,- binary >= 0.6.3.0 && < 0.9,- network >= 2.3 && < 2.7,+ network-transport-tcp >= 0.4 && < 0.9,+ binary >= 0.8 && < 0.9,+ network >= 2.3 && < 3.3, HUnit >= 1.2 && < 2,- stm >= 2.3 && < 2.5,- time > 1.4 && < 1.9,+ stm,+ time > 1.4 && < 1.15, test-framework >= 0.6 && < 0.9, test-framework-hunit, transformers, rematch >= 0.2.0.0, ghc-prim- hs-source-dirs:- tests- ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind- extensions: CPP+ hs-source-dirs: tests+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind main-is: TestLog.hs+ default-language: Haskell2010
src/Control/Distributed/Process/Extras/SystemLog.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -94,11 +95,7 @@ import Data.Typeable (Typeable) import GHC.Generics -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, error, Read)-#else import Prelude hiding (error, Read)-#endif import System.IO ( IOMode(AppendMode)
tests/TestLog.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -19,11 +20,7 @@ import Control.Monad (void) import Data.List (delete) -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, drop, Read)-#else import Prelude hiding (drop, read, Read)-#endif import Test.Framework (Test, testGroup, defaultMain) import Test.Framework.Providers.HUnit (testCase)@@ -133,8 +130,7 @@ -- | Given a @builder@ function, make and run a test suite on a single transport testMain :: (NT.Transport -> IO [Test]) -> IO () testMain builder = do- Right (transport, _) <- createTransportExposeInternals- "127.0.0.1" "0" defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters testData <- builder transport defaultMain testData
tests/TestPrimitives.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} @@ -18,9 +19,6 @@ import Control.Rematch hiding (match) import qualified Network.Transport as NT (Transport) import Network.Transport.TCP()-#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch)-#endif import Test.HUnit (Assertion) import Test.Framework (Test, testGroup, defaultMain)@@ -195,13 +193,14 @@ ], testGroup "Call/RPC" [ testCase "multicallTest" (multicallTest transport)- ],- testGroup "Node Monitoring" [- testCase "Death Notifications"- (delayedAssertion- "subscribers should both have received NodeDown twice"- localNode () (testMonitorNodeDeath transport)) ]+ -- TODO: the test below has been very flaky in CI+ -- testGroup "Node Monitoring" [+ -- testCase "Death Notifications"+ -- (delayedAssertion+ -- "subscribers should both have received NodeDown twice"+ -- localNode () (testMonitorNodeDeath transport))+ -- ] ] primitivesTests :: NT.Transport -> IO [Test]@@ -213,8 +212,7 @@ -- | Given a @builder@ function, make and run a test suite on a single transport testMain :: (NT.Transport -> IO [Test]) -> IO () testMain builder = do- Right (transport, _) <- createTransportExposeInternals- "127.0.0.1" "0" defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters testData <- builder transport defaultMain testData
tests/TestTimer.hs view
@@ -1,8 +1,7 @@+{-# OPTIONS_GHC -Wno-orphans #-}+{-# LANGUAGE CPP #-} module Main where -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch)-#endif import Control.Monad (forever) import Control.Concurrent.MVar ( newEmptyMVar@@ -25,8 +24,6 @@ import Network.Transport.TCP import qualified Network.Transport as NT -import GHC.Generics- instance NFData Ping where testSendAfter :: TestResult Bool -> Process ()@@ -186,8 +183,7 @@ -- | Given a @builder@ function, make and run a test suite on a single transport testMain :: (NT.Transport -> IO [Test]) -> IO () testMain builder = do- Right (transport, _) <- createTransportExposeInternals- "127.0.0.1" "0" defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters testData <- builder transport defaultMain testData