@@ -152,7 +152,6 @@ import Control.Distributed.Process.Internal.Primitives
152152 , receiveWait
153153 , match
154154 , sendChan
155− , ProcessKillException(..)
156155 , ProcessExitException(..)
157156 )
158157import Control.Distributed.Process.Internal.Types
@@ -481,6 +480,17 @@ initNCState = NCState { _links = Map.empty
481480 , _registeredOnNodes = Map.empty
482481 }
483482
483+-- | Thrown in response to the user invoking 'kill' (see Primitives.hs). This
484+-- type is deliberately not exported so it cannot be caught explicitly.
485+data ProcessKillException =
486+ ProcessKillException !ProcessId !String
487+ deriving (Typeable)
488+
489+instance Exception ProcessKillException
490+instance Show ProcessKillException where
491+ show (ProcessKillException pid reason) =
492+ "killed-by=" ++ show pid ++ ",reason=" ++ reason
493+
484494--------------------------------------------------------------------------------
485495-- Core functionality --
486496--------------------------------------------------------------------------------