packages feed

distributed-process-lifted 0.2.0.1 → 0.3.0.0

raw patch · 3 files changed

+19/−14 lines, 3 filesdep ~distributed-processdep ~network-transportPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: distributed-process, network-transport

API changes (from Hackage documentation)

+ Control.Distributed.Process.Lifted: withMonitor_ :: MonadProcessBase m => ProcessId -> m a -> m a
+ Control.Distributed.Process.Lifted.Class: type family StMP m a :: *;
+ Control.Distributed.Process.Lifted.Class: }
- Control.Distributed.Process.Lifted: catchesExit :: (MonadProcessBase m) => m a -> [ProcessId -> Message -> m (Maybe a)] -> m a
+ Control.Distributed.Process.Lifted: catchesExit :: forall m a. (MonadProcessBase m) => m a -> [ProcessId -> Message -> m (Maybe a)] -> m a
- Control.Distributed.Process.Lifted: withMonitor :: MonadProcessBase m => ProcessId -> m a -> m a
+ Control.Distributed.Process.Lifted: withMonitor :: ProcessId -> (MonitorRef -> Process a) -> Process a
- Control.Distributed.Process.Lifted.Class: class (MonadProcess m) => MonadProcessBase m where type family StMP m a :: *
+ Control.Distributed.Process.Lifted.Class: class (MonadProcess m) => MonadProcessBase m where type StMP m a :: * where {
- Control.Distributed.Process.Lifted.Extras: fromProcess :: (MonadBase IO m) => LocalNode -> Process a -> m a
+ Control.Distributed.Process.Lifted.Extras: fromProcess :: forall a m. (MonadBase IO m) => LocalNode -> Process a -> m a
- Control.Distributed.Process.Lifted.Extras: fromProxy :: (MonadBase IO m) => ProcessProxy -> Process a -> m a
+ Control.Distributed.Process.Lifted.Extras: fromProxy :: forall a m. (MonadBase IO m) => ProcessProxy -> Process a -> m a
- Control.Distributed.Process.Lifted.Extras: inProxy :: (MonadBase IO m) => ProcessProxy -> Process () -> m ()
+ Control.Distributed.Process.Lifted.Extras: inProxy :: forall m. (MonadBase IO m) => ProcessProxy -> Process () -> m ()
- Control.Distributed.Process.Lifted.Extras: spawnProxyIO :: (MonadBase IO m) => LocalNode -> m ProcessProxy
+ Control.Distributed.Process.Lifted.Extras: spawnProxyIO :: forall m. (MonadBase IO m) => LocalNode -> m ProcessProxy

Files

distributed-process-lifted.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/  name:                distributed-process-lifted-version:             0.2.0.1+version:             0.3.0.0 synopsis:            monad-control style typeclass and transformer instances for Process monad.  description:         This package provides typeclasses and functions for lifting functions and control operations (such as spawnLocal) from the @Process@ monad @@ -39,9 +39,9 @@   -- other-modules:          -- other-extensions:       build-depends:       base < 5-                     , distributed-process >= 0.5.1 && < 0.7+                     , distributed-process >= 0.5.1 && < 0.8                      , distributed-process-monad-control >= 0.5 && < 0.6-                     , network-transport >= 0.2 && < 0.5+                     , network-transport >= 0.2 && < 0.6                      , lifted-base  >= 0.2 && < 0.3                      , transformers >= 0.4 && < 0.6                      , transformers-base >= 0.4.1 && <= 0.5.0 
src/Control/Distributed/Process/Lifted.hs view
@@ -262,9 +262,13 @@ whereisRemoteAsync = liftP .: Base.whereisRemoteAsync  -- | Generalized version of 'Base.withMonitor'-withMonitor :: MonadProcessBase m => ProcessId -> m a -> m a-withMonitor pid ma = controlP $ \runInP ->-                        Base.withMonitor pid (runInP ma)+withMonitor :: ProcessId -> (MonitorRef -> Process a) -> Process a+withMonitor = liftP .: Base.withMonitor++-- | Generalized version of 'Base.withMonitor_'+withMonitor_ :: MonadProcessBase m => ProcessId -> m a -> m a+withMonitor_ pid ma = controlP $ \runInP ->+                        Base.withMonitor_ pid (runInP ma)  -- | Generalized version of 'Base.call' call :: (MonadProcess m,Serializable a)
test/Control/Distributed/Process/Lifted/Tests.hs view
@@ -640,8 +640,9 @@     let nid1 = localNodeId node1     registerRemoteAsync nid1 "ping" pingServer     receiveWait [-       matchIf (\(RegisterReply label' _) -> "ping" == label')-               (\(RegisterReply _ _) -> return ()) ]+       matchIf (\(RegisterReply label' _ (Just pid)) ->+                  "ping" == label' && pid == pingServer)+               (\(RegisterReply _ _ _) -> return ()) ]      Just pid <- whereisRemote nid1 "ping"     True <- return $ pingServer == pid@@ -826,8 +827,8 @@     us <- getSelfPid     registerRemoteAsync nid1 "a" us -- registerRemote is asynchronous     receiveWait [-        matchIf (\(RegisterReply label' _) -> "a" == label')-                (\(RegisterReply _ _) -> return ()) ]+        matchIf (\(RegisterReply label' _ _) -> "a" == label')+                (\(RegisterReply _ _ _) -> return ()) ]      Just _  <- whereisRemote nid1 "a" @@ -838,14 +839,14 @@     -- This will happen due to implicit reconnect     registerRemoteAsync nid1 "b" us     receiveWait [-        matchIf (\(RegisterReply label' _) -> "b" == label')-                (\(RegisterReply _ _) -> return ()) ]+        matchIf (\(RegisterReply label' _ _) -> "b" == label')+                (\(RegisterReply _ _ _) -> return ()) ]      -- Should happen     registerRemoteAsync nid1 "c" us     receiveWait [-        matchIf (\(RegisterReply label' _) -> "c" == label')-                (\(RegisterReply _ _) -> return ()) ]+        matchIf (\(RegisterReply label' _ _) -> "c" == label')+                (\(RegisterReply _ _ _) -> return ()) ]      -- Check     Nothing  <- whereisRemote nid1 "a"  -- this will fail because the name is removed when the node is disconnected