@@ -25,13 +25,18 @@ import Control.Concurrent.MVar
26import Control.Monad (replicateM_, replicateM, forever, void, unless, join)
26import Control.Monad (replicateM_, replicateM, forever, void, unless, join)
27import Control.Exception (SomeException, throwIO, ErrorCall(..))
27import Control.Exception (SomeException, throwIO, ErrorCall(..))
28−import qualified Control.Exception as Ex (catch)
28+import Control.Monad.Catch (try, catch, finally, mask, onException)
29−import Control.Applicative ((<$>), (<*>), pure, (<|>))
29+import Control.Applicative ((<|>))
30import qualified Network.Transport as NT (closeEndPoint, EndPointAddress)
30import qualified Network.Transport as NT (closeEndPoint, EndPointAddress)
31−import Control.Distributed.Process
31+import Control.Distributed.Process hiding
32import Control.Distributed.Process.Internal.Types
38import Control.Distributed.Process.Internal.Types
33− ( NodeId(nodeAddress)
34− , LocalNode(localEndPoint)
39+ ( LocalNode(localEndPoint)
35 , ProcessExitException(..)
40 , ProcessExitException(..)
36 , nullProcessId
41 , nullProcessId
37 , createUnencodedMessage
42 , createUnencodedMessage
@@ -68,7 +73,7 @@ expectThat a matcher = case res of
68forkTry :: IO () -> IO ThreadId
73forkTry :: IO () -> IO ThreadId
69forkTry p = do
74forkTry p = do
70 tid <- myThreadId
75 tid <- myThreadId
71− forkIO $ Ex.catch p (\e -> throwTo tid (e :: SomeException))
76+ forkIO $ catch p (\e -> throwTo tid (e :: SomeException))
73-- | The ping server from the paper
78-- | The ping server from the paper
74ping :: Process ()
79ping :: Process ()
@@ -760,8 +765,8 @@ testRemoteRegistry TestTransport{..} = do
760 (\(RegisterReply _ _ _) -> return ()) ]
765 (\(RegisterReply _ _ _) -> return ()) ]
761 registerRemoteAsync nid1 "ping" deadProcess
766 registerRemoteAsync nid1 "ping" deadProcess
762 receiveWait [
767 receiveWait [
763− matchIf (\(RegisterReply label' False (Just pid)) ->
768+ matchIf (\(RegisterReply label' False (Just pid'')) ->
764− "ping" == label' && pid == pingServer)
769+ "ping" == label' && pid'' == pingServer)
765 (\(RegisterReply _ _ _) -> return ()) ]
770 (\(RegisterReply _ _ _) -> return ()) ]
766 unregisterRemoteAsync nid1 "dead"
771 unregisterRemoteAsync nid1 "dead"
767 receiveWait [
772 receiveWait [