distributed-process-execution 0.1.2.2 → 0.1.3.0
raw patch · 8 files changed
+88/−94 lines, 8 filesdep +distributed-process-systestdep −derivedep −distributed-process-testsdep −template-haskelldep ~basedep ~binarydep ~containerssetup-changednew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: distributed-process-systest
Dependencies removed: derive, distributed-process-tests, template-haskell, uniplate
Dependency ranges changed: base, binary, containers, deepseq, distributed-process, distributed-process-client-server, distributed-process-extras, distributed-process-supervisor, hashable, network, network-transport, network-transport-tcp, stm, time
API changes (from Hackage documentation)
- Control.Distributed.Process.Execution.EventManager: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.EventManager.C1_0EventManager
- Control.Distributed.Process.Execution.EventManager: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.EventManager.D1EventManager
- Control.Distributed.Process.Execution.EventManager: instance GHC.Generics.Selector Control.Distributed.Process.Execution.EventManager.S1_0_0EventManager
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0ControlMessage
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0FilterResult
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0Mailbox
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0MailboxStats
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0Mode
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0NewMail
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0Post
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_0StatsReq
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_1ControlMessage
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_1FilterResult
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_1Mode
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_2FilterResult
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Constructor Control.Distributed.Process.Execution.Mailbox.C1_2Mode
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1ControlMessage
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1FilterResult
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1Mailbox
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1MailboxStats
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1Mode
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1NewMail
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1Post
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Datatype Control.Distributed.Process.Execution.Mailbox.D1StatsReq
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_0Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_0Mailbox
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_0MailboxStats
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_1Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_1Mailbox
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_1MailboxStats
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_2Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_2MailboxStats
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_3Delivery
- Control.Distributed.Process.Execution.Mailbox: instance GHC.Generics.Selector Control.Distributed.Process.Execution.Mailbox.S1_0_3MailboxStats
+ Control.Distributed.Process.Execution: BindHeader :: !String -> !HeaderName -> Binding
+ Control.Distributed.Process.Execution: BindKey :: !String -> Binding
+ Control.Distributed.Process.Execution: BindNone :: Binding
+ Control.Distributed.Process.Execution: Delivery :: Mailbox -> [Message] -> Integer -> Integer -> Delivery
+ Control.Distributed.Process.Execution: ExchangeType :: String -> s -> (s -> Message -> Process s) -> (s -> Message -> Process s) -> ExchangeType s
+ Control.Distributed.Process.Execution: Keep :: FilterResult
+ Control.Distributed.Process.Execution: MailboxStats :: Integer -> Integer -> Limit -> ProcessId -> MailboxStats
+ Control.Distributed.Process.Execution: Message :: !String -> ![(String, String)] -> !Message -> Message
+ Control.Distributed.Process.Execution: NewMail :: !Mailbox -> !Integer -> NewMail
+ Control.Distributed.Process.Execution: PayloadOnly :: RelayType
+ Control.Distributed.Process.Execution: Queue :: BufferType
+ Control.Distributed.Process.Execution: Ring :: BufferType
+ Control.Distributed.Process.Execution: Send :: FilterResult
+ Control.Distributed.Process.Execution: Skip :: FilterResult
+ Control.Distributed.Process.Execution: Stack :: BufferType
+ Control.Distributed.Process.Execution: WholeMessage :: RelayType
+ Control.Distributed.Process.Execution: [bindingKey] :: Binding -> !String
+ Control.Distributed.Process.Execution: [box] :: Delivery -> Mailbox
+ Control.Distributed.Process.Execution: [configureEx] :: ExchangeType s -> s -> Message -> Process s
+ Control.Distributed.Process.Execution: [count] :: Delivery -> Integer
+ Control.Distributed.Process.Execution: [currentLimit] :: MailboxStats -> Limit
+ Control.Distributed.Process.Execution: [droppedMessages] :: MailboxStats -> Integer
+ Control.Distributed.Process.Execution: [headerName] :: Binding -> !HeaderName
+ Control.Distributed.Process.Execution: [headers] :: Message -> ![(String, String)]
+ Control.Distributed.Process.Execution: [key] :: Message -> !String
+ Control.Distributed.Process.Execution: [messages] :: Delivery -> [Message]
+ Control.Distributed.Process.Execution: [name] :: ExchangeType s -> String
+ Control.Distributed.Process.Execution: [owningProcess] :: MailboxStats -> ProcessId
+ Control.Distributed.Process.Execution: [payload] :: Message -> !Message
+ Control.Distributed.Process.Execution: [pendingMessages] :: MailboxStats -> Integer
+ Control.Distributed.Process.Execution: [routeEx] :: ExchangeType s -> s -> Message -> Process s
+ Control.Distributed.Process.Execution: [state] :: ExchangeType s -> s
+ Control.Distributed.Process.Execution: [totalDropped] :: Delivery -> Integer
+ Control.Distributed.Process.Execution: __remoteTable :: RemoteTable -> RemoteTable
+ Control.Distributed.Process.Execution: acceptEverything :: Closure (Message -> Process FilterResult)
+ Control.Distributed.Process.Execution: acceptMatching :: Closure (Closure (Message -> Process FilterResult) -> Message -> Process FilterResult)
+ Control.Distributed.Process.Execution: active :: Mailbox -> Filter -> Process ()
+ Control.Distributed.Process.Execution: applyHandlers :: a -> Message -> [Message -> Process (Maybe a)] -> Process a
+ Control.Distributed.Process.Execution: bindHeader :: HeaderName -> String -> Exchange -> Process ()
+ Control.Distributed.Process.Execution: bindKey :: String -> Exchange -> Process ()
+ Control.Distributed.Process.Execution: bindToBroadcaster :: Exchange -> Process ()
+ Control.Distributed.Process.Execution: broadcastClient :: Exchange -> Process (InputStream Message)
+ Control.Distributed.Process.Execution: broadcastExchange :: Process Exchange
+ Control.Distributed.Process.Execution: broadcastExchangeT :: Process BroadcastExchange
+ Control.Distributed.Process.Execution: class (Hashable k, Eq k, Serializable k) => Bindable k
+ Control.Distributed.Process.Execution: configureExchange :: Serializable m => Exchange -> m -> Process ()
+ Control.Distributed.Process.Execution: createMailbox :: BufferType -> Limit -> Process Mailbox
+ Control.Distributed.Process.Execution: createMessage :: Serializable m => String -> [(String, String)] -> m -> Message
+ Control.Distributed.Process.Execution: data Binding
+ Control.Distributed.Process.Execution: data BufferType
+ Control.Distributed.Process.Execution: data Delivery
+ Control.Distributed.Process.Execution: data Exchange
+ Control.Distributed.Process.Execution: data ExchangeType s
+ Control.Distributed.Process.Execution: data FilterResult
+ Control.Distributed.Process.Execution: data Mailbox
+ Control.Distributed.Process.Execution: data MailboxStats
+ Control.Distributed.Process.Execution: data Message
+ Control.Distributed.Process.Execution: data NewMail
+ Control.Distributed.Process.Execution: data RelayType
+ Control.Distributed.Process.Execution: deliver :: Mailbox -> Process ()
+ Control.Distributed.Process.Execution: headerContentRouter :: RelayType -> HeaderName -> Process Exchange
+ Control.Distributed.Process.Execution: messageKeyRouter :: RelayType -> Process Exchange
+ Control.Distributed.Process.Execution: monitor :: Mailbox -> Process MonitorRef
+ Control.Distributed.Process.Execution: notify :: Mailbox -> Process ()
+ Control.Distributed.Process.Execution: post :: Serializable a => Exchange -> a -> Process ()
+ Control.Distributed.Process.Execution: postMessage :: Exchange -> Message -> Process ()
+ Control.Distributed.Process.Execution: resize :: Mailbox -> Integer -> Process ()
+ Control.Distributed.Process.Execution: route :: Serializable m => Exchange -> m -> Process ()
+ Control.Distributed.Process.Execution: routeMessage :: Exchange -> Message -> Process ()
+ Control.Distributed.Process.Execution: router :: Bindable k => RelayType -> BindingSelector k -> Process Exchange
+ Control.Distributed.Process.Execution: runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
+ Control.Distributed.Process.Execution: startExchange :: forall s. ExchangeType s -> Process Exchange
+ Control.Distributed.Process.Execution: startMailbox :: ProcessId -> BufferType -> Limit -> Process Mailbox
+ Control.Distributed.Process.Execution: startSupervisedMailbox :: ProcessId -> BufferType -> Limit -> SupervisorPid -> Process Mailbox
+ Control.Distributed.Process.Execution: startSupervisedRef :: forall s. ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
+ Control.Distributed.Process.Execution: statistics :: Mailbox -> Process MailboxStats
+ Control.Distributed.Process.Execution: supervisedRouter :: Bindable k => RelayType -> BindingSelector k -> SupervisorPid -> Process Exchange
+ Control.Distributed.Process.Execution: type BindingSelector k = (Message -> Process k)
+ Control.Distributed.Process.Execution: type BroadcastExchange = ExchangeType BroadcastEx
+ Control.Distributed.Process.Execution: type HeaderName = String
+ Control.Distributed.Process.Execution: type Limit = Integer
+ Control.Distributed.Process.Execution.Mailbox: instance Control.Distributed.Process.Extras.Internal.Types.Addressable Control.Distributed.Process.Execution.Mailbox.Mailbox
- Control.Distributed.Process.Execution.EventManager: addHandler :: Serializable a => EventManager -> (s -> a -> Process s) -> Process s -> Process ProcessId
+ Control.Distributed.Process.Execution.EventManager: addHandler :: forall s a. Serializable a => EventManager -> (s -> a -> Process s) -> Process s -> Process ProcessId
- Control.Distributed.Process.Execution.EventManager: addMessageHandler :: EventManager -> (s -> Message -> Process (Maybe s)) -> Process s -> Process ProcessId
+ Control.Distributed.Process.Execution.EventManager: addMessageHandler :: forall s. EventManager -> (s -> Message -> Process (Maybe s)) -> Process s -> Process ProcessId
- Control.Distributed.Process.Execution.Exchange: router :: (Bindable k) => RelayType -> BindingSelector k -> Process Exchange
+ Control.Distributed.Process.Execution.Exchange: router :: Bindable k => RelayType -> BindingSelector k -> Process Exchange
- Control.Distributed.Process.Execution.Exchange: runExchange :: ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
+ Control.Distributed.Process.Execution.Exchange: runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
- Control.Distributed.Process.Execution.Exchange: startExchange :: ExchangeType s -> Process Exchange
+ Control.Distributed.Process.Execution.Exchange: startExchange :: forall s. ExchangeType s -> Process Exchange
- Control.Distributed.Process.Execution.Exchange: startSupervised :: ExchangeType s -> SupervisorPid -> Process Exchange
+ Control.Distributed.Process.Execution.Exchange: startSupervised :: forall s. ExchangeType s -> SupervisorPid -> Process Exchange
- Control.Distributed.Process.Execution.Exchange: startSupervisedRef :: ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
+ Control.Distributed.Process.Execution.Exchange: startSupervisedRef :: forall s. ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
- Control.Distributed.Process.Execution.Exchange: type BindingSelector k = Message -> Process k
+ Control.Distributed.Process.Execution.Exchange: type BindingSelector k = (Message -> Process k)
Files
- ChangeLog +5/−0
- Setup.lhs +0/−3
- distributed-process-execution.cabal +62/−56
- src/Control/Distributed/Process/Execution/Exchange/Internal.hs +4/−5
- src/Control/Distributed/Process/Execution/Mailbox.hs +9/−11
- tests/MailboxTestFilters.hs +1/−4
- tests/TestExchange.hs +3/−7
- tests/TestMailbox.hs +4/−8
ChangeLog view
@@ -1,3 +1,8 @@+2024-09-03 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.1.3.0++* Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1+* Updated links to point to Distributed Haskell monorepo+ 2015-06-15 Facundo Domínguez <facundo.dominguez@tweag.io> 0.1.2 * Add compatibility with ghc-7.10.
− Setup.lhs
@@ -1,3 +0,0 @@-#!/usr/bin/env runhaskell-> import Distribution.Simple-> main = defaultMain
distributed-process-execution.cabal view
@@ -1,56 +1,59 @@+cabal-version: 3.0 name: distributed-process-execution-version: 0.1.2.2-cabal-version: >=1.8+version: 0.1.3.0 build-type: Simple-license: BSD3+license: BSD-3-Clause license-file: LICENCE stability: experimental Copyright: Tim Watson 2012 - 2013 Author: Tim Watson-Maintainer: Facundo Domínguez <facundo.dominguez@tweag.io>-Stability: experimental-Homepage: http://github.com/haskell-distributed/distributed-process-execution-Bug-Reports: http://github.com/haskell-distributed/distributed-process-execution/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: Execution Framework for The Cloud Haskell Application Platform description: The Execution Framework provides tools for load regulation, workload shedding and remote hand-off. The currently implementation provides only a subset of the plumbing required, comprising tools for event management, mailbox buffering and message routing. category: Control-tested-with: GHC == 7.4.2 GHC == 7.6.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-execution+ Type: git+ Location: https://github.com/haskell-distributed/distributed-process+ SubDir: packages/distributed-process-execution +common warnings+ ghc-options: -Wall+ -Wcompat+ -Widentities+ -Wincomplete-uni-patterns+ -Wincomplete-record-updates+ -Wredundant-constraints+ -fhide-source-paths+ -Wpartial-fields+ library+ import: warnings build-depends:- base >= 4.4 && < 5,+ base >= 4.14 && < 5, data-accessor >= 0.2.2.3,- distributed-process >= 0.5.3 && < 0.7,- distributed-process-extras >= 0.2.0 && < 0.3,- distributed-process-supervisor >= 0.1.2 && < 0.2,- distributed-process-client-server >= 0.1.2 && < 0.2,- binary >= 0.6.3.0 && < 0.8,- deepseq >= 1.3.0.1 && < 1.5,+ distributed-process >= 0.6.6 && < 0.8,+ distributed-process-extras >= 0.3.1 && < 0.4,+ distributed-process-supervisor >= 0.2.0 && < 0.3,+ distributed-process-client-server >= 0.2.0 && < 0.3,+ binary >= 0.8 && < 0.9,+ deepseq >= 1.4 && < 1.6, mtl,- containers >= 0.4 && < 0.6,- hashable >= 1.2.0.5 && < 1.3,+ containers >= 0.6 && < 0.8,+ hashable >= 1.2.0.5 && < 1.6, unordered-containers >= 0.2.3.0 && < 0.3, fingertree < 0.2,- stm >= 2.4 && < 2.5,- time > 1.4 && < 1.6,+ stm >= 2.4 && < 2.6,+ time, transformers- if impl(ghc <= 7.5)- Build-Depends: template-haskell == 2.7.0.0,- derive == 2.5.5,- uniplate == 1.6.12,- ghc-prim- extensions: CPP hs-source-dirs: src- ghc-options: -Wall exposed-modules: Control.Distributed.Process.Execution, Control.Distributed.Process.Execution.EventManager,@@ -60,34 +63,36 @@ Control.Distributed.Process.Execution.Exchange.Broadcast, Control.Distributed.Process.Execution.Exchange.Internal, Control.Distributed.Process.Execution.Exchange.Router+ default-language: Haskell2010 test-suite ExchangeTests+ import: warnings type: exitcode-stdio-1.0 -- x-uses-tf: true build-depends:- base >= 4.4 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.7, containers, hashable, unordered-containers >= 0.2.3.0 && < 0.3,- distributed-process >= 0.5.3 && < 0.7,+ distributed-process, distributed-process-execution,- distributed-process-extras >= 0.2.0 && < 0.3,- distributed-process-tests >= 0.4.1 && < 0.5,+ distributed-process-extras,+ distributed-process-systest >= 0.1.1 && < 0.4, distributed-static, bytestring, data-accessor, fingertree < 0.2,- network-transport >= 0.4 && < 0.5,- deepseq >= 1.3.0.1 && < 1.5,+ network-transport >= 0.4 && < 0.6,+ deepseq, mtl,- network-transport-tcp >= 0.4 && < 0.6,- binary >= 0.6.3.0 && < 0.8,- 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.6,+ stm,+ time, test-framework >= 0.6 && < 0.9, test-framework-hunit, QuickCheck >= 2.4,@@ -97,37 +102,38 @@ ghc-prim hs-source-dirs: tests- ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind -eventlog- extensions: CPP+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind -eventlog main-is: TestExchange.hs+ default-language: Haskell2010 test-suite MailboxTests+ import: warnings type: exitcode-stdio-1.0 -- x-uses-tf: true build-depends:- base >= 4.4 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.7, containers, hashable, unordered-containers >= 0.2.3.0 && < 0.3,- distributed-process >= 0.5.3 && < 0.7,+ distributed-process, distributed-process-execution,- distributed-process-extras >= 0.2.0 && < 0.3,- distributed-process-tests >= 0.4.1 && < 0.5,+ distributed-process-extras,+ distributed-process-systest >= 0.1.1 && < 0.4, distributed-static, bytestring, data-accessor, fingertree < 0.2,- network-transport >= 0.4 && < 0.5,- deepseq >= 1.3.0.1 && < 1.5,+ network-transport >= 0.4 && < 0.6,+ deepseq, mtl,- network-transport-tcp >= 0.4 && < 0.6,- binary >= 0.6.3.0 && < 0.8,- 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.6,+ stm,+ time, test-framework >= 0.6 && < 0.9, test-framework-hunit, QuickCheck >= 2.4,@@ -137,7 +143,7 @@ ghc-prim hs-source-dirs: tests- ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind -eventlog- extensions: CPP+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind -eventlog main-is: TestMailbox.hs other-modules: MailboxTestFilters+ default-language: Haskell2010
src/Control/Distributed/Process/Execution/Exchange/Internal.hs view
@@ -243,10 +243,10 @@ liftIO $ putMVar tc $ channelControlPort cc return $ defaultProcess {- apiHandlers = [ handleControlChan cc handleControlMessage ]- , infoHandlers = [ handleInfo handleMonitor- , handleRaw convertToCC- ]+ externHandlers = [ handleControlChan cc handleControlMessage ]+ , infoHandlers = [ handleInfo handleMonitor+ , handleRaw convertToCC+ ] } :: Process (ProcessDefinition (ExchangeType s)) handleMonitor :: forall s.@@ -273,4 +273,3 @@ Configure msg -> configureEx state msg Post msg -> routeEx state msg in action >>= \s -> continue $ ex { state = s }-
src/Control/Distributed/Process/Execution/Mailbox.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE StandaloneDeriving #-}@@ -133,11 +134,12 @@ , mkStaticClosure ) import Control.Distributed.Process.Serializable hiding (SerializableDict)-import Control.Distributed.Process.Extras.Internal.Types+import Control.Distributed.Process.Extras ( ExitReason(..) , Resolvable(..) , Routable(..) , Linkable(..)+ , Addressable ) import Control.Distributed.Process.ManagedProcess ( call@@ -196,11 +198,7 @@ import GHC.Generics -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, drop)-#else import Prelude hiding (drop)-#endif -------------------------------------------------------------------------------- -- Types --@@ -227,6 +225,8 @@ sendTo = post unsafeSendTo = post +instance Addressable Mailbox+ sendCtrlMsg :: Mailbox -> ControlMessage -> Process ()@@ -449,9 +449,6 @@ -- | As 'startMailbox', but suitable for use in supervisor child specs. ----- Example:--- > childSpec = toChildStart $ startSupervisedMailbox pid bufferType mboxLimit--- -- See "Control.Distributed.Process.Supervisor" -- startSupervisedMailbox :: ProcessId@@ -567,9 +564,11 @@ processDefinition pid tc cc = do liftIO $ atomically $ writeTChan tc $ channelControlPort cc return $ defaultProcess { apiHandlers = [- handleControlChan cc handleControlMessages- , Restricted.handleCall handleGetStats+ Restricted.handleCall handleGetStats ]+ , externHandlers = [+ handleControlChan cc handleControlMessages+ ] , infoHandlers = [ handleInfo handlePost , handleRaw handleRawInputs ] , unhandledMessagePolicy = DeadLetter pid@@ -741,4 +740,3 @@ -- deliver :: Mailbox -> Process () deliver mb = active mb acceptEverything-
tests/MailboxTestFilters.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -7,11 +8,7 @@ import Control.Distributed.Process.Execution.Mailbox (FilterResult(..)) import Control.Monad (forM) -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, drop)-#else import Prelude hiding (drop)-#endif import Data.Maybe (catMaybes) import Control.Distributed.Process.Closure (remotable, mkClosure, mkStaticClosure)
tests/TestExchange.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -15,15 +16,11 @@ import qualified Control.Distributed.Process.Execution.EventManager as EventManager ( start )-import Control.Distributed.Process.Tests.Internal.Utils+import Control.Distributed.Process.SysTest.Utils import Control.Monad (void, forM, forever) import Control.Rematch (equalTo) -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, drop)-#else import Prelude hiding (drop)-#endif import Network.Transport.TCP import qualified Network.Transport as NT import Test.Framework as TF (defaultMain, testGroup, Test)@@ -188,7 +185,6 @@ -- | 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" "10501" defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "10501") defaultTCPParameters testData <- builder transport defaultMain testData
tests/TestMailbox.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -10,16 +11,12 @@ import Control.Distributed.Process.Execution.Mailbox import Control.Distributed.Process.Extras.Time import Control.Distributed.Process.Extras.Timer-import Control.Distributed.Process.Tests.Internal.Utils+import Control.Distributed.Process.SysTest.Utils import Control.Rematch (equalTo) -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, drop)-#else import Prelude hiding (drop)-#endif import Data.Maybe (catMaybes) @@ -190,7 +187,7 @@ (delayedAssertion "Expected the Queue to offer FIFO ordering" localNode True (allBuffersShouldRespectFIFOOrdering Queue))- + , testCase "Stack Ordering" (delayedAssertion "Expected the Queue to offer FIFO ordering"@@ -259,7 +256,6 @@ -- | 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" "10501" defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "10501") defaultTCPParameters testData <- builder transport defaultMain testData