@@ -25,13 +25,18 @@ import Control.Concurrent.MVar
2525 )
2626import Control.Monad (replicateM_, replicateM, forever, void, unless, join)
2727import Control.Exception (SomeException, throwIO, ErrorCall(..))
28−import qualified Control.Exception as Ex (catch)
29−import Control.Applicative ((<$>), (<*>), pure, (<|>))
28+import Control.Monad.Catch (try, catch, finally, mask, onException)
29+import Control.Applicative ((<|>))
3030import qualified Network.Transport as NT (closeEndPoint, EndPointAddress)
31−import Control.Distributed.Process
31+import Control.Distributed.Process hiding
32+ ( try
33+ , catch
34+ , finally
35+ , mask
36+ , onException
37+ )
3238import Control.Distributed.Process.Internal.Types
33− ( NodeId(nodeAddress)
34− , LocalNode(localEndPoint)
39+ ( LocalNode(localEndPoint)
3540 , ProcessExitException(..)
3641 , nullProcessId
3742 , createUnencodedMessage
@@ -65,7 +70,7 @@ expectThat a matcher = case res of
6570forkTry :: IO () -> IO ThreadId
6671forkTry p = do
6772 tid <- myThreadId
68− forkIO $ Ex.catch p (\e -> throwTo tid (e :: SomeException))
73+ forkIO $ catch p (\e -> throwTo tid (e :: SomeException))
6974
7075-- | The ping server from the paper
7176ping :: Process ()
@@ -700,8 +705,8 @@ testRemoteRegistry TestTransport{..} = do
700705 (\(RegisterReply _ _ _) -> return ()) ]
701706 registerRemoteAsync nid1 "ping" deadProcess
702707 receiveWait [
703− matchIf (\(RegisterReply label' False (Just pid)) ->
704− "ping" == label' && pid == pingServer)
708+ matchIf (\(RegisterReply label' False (Just pid'')) ->
709+ "ping" == label' && pid'' == pingServer)
705710 (\(RegisterReply _ _ _) -> return ()) ]
706711 unregisterRemoteAsync nid1 "dead"
707712 receiveWait [