@@ -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
@@ -68,7 +73,7 @@ expectThat a matcher = case res of
6873forkTry :: IO () -> IO ThreadId
6974forkTry p = do
7075 tid <- myThreadId
71− forkIO $ Ex.catch p (\e -> throwTo tid (e :: SomeException))
76+ forkIO $ catch p (\e -> throwTo tid (e :: SomeException))
7277
7378-- | The ping server from the paper
7479ping :: Process ()
@@ -760,8 +765,8 @@ testRemoteRegistry TestTransport{..} = do
760765 (\(RegisterReply _ _ _) -> return ()) ]
761766 registerRemoteAsync nid1 "ping" deadProcess
762767 receiveWait [
763− matchIf (\(RegisterReply label' False (Just pid)) ->
764− "ping" == label' && pid == pingServer)
768+ matchIf (\(RegisterReply label' False (Just pid'')) ->
769+ "ping" == label' && pid'' == pingServer)
765770 (\(RegisterReply _ _ _) -> return ()) ]
766771 unregisterRemoteAsync nid1 "dead"
767772 receiveWait [