@@ -512,9 +512,11 @@ data PortLinkException =
512512
513513-- | Exception thrown when a process attempts to register
514514-- a process under an already-registered name or to
515−-- unregister a name that hasn't been registered
515+-- unregister a name that hasn't been registered. Returns
516+-- the name and the identifier of the process that owns it,
517+-- if any.
516518data ProcessRegistrationException =
517− ProcessRegistrationException !String
519+ ProcessRegistrationException !String !(Maybe ProcessId)
518520 deriving (Typeable, Show)
519521
520522-- | Internal exception thrown indirectly by 'exit'
@@ -579,7 +581,7 @@ data WhereIsReply = WhereIsReply String (Maybe ProcessId)
579581 deriving (Show, Typeable)
580582
581583-- | (Asynchronous) reply from 'register' and 'unregister'
582−data RegisterReply = RegisterReply String Bool
584+data RegisterReply = RegisterReply String Bool (Maybe ProcessId)
583585 deriving (Show, Typeable)
584586
585587data NodeStats = NodeStats {
@@ -748,8 +750,8 @@ instance Binary WhereIsReply where
748750 get = WhereIsReply <$> get <*> get
749751
750752instance Binary RegisterReply where
751− put (RegisterReply label ok) = put label >> put ok
752− get = RegisterReply <$> get <*> get
753+ put (RegisterReply label ok owner) = put label >> put ok >> put owner
754+ get = RegisterReply <$> get <*> get <*> get
753755
754756instance Binary ProcessInfo where
755757 get = ProcessInfo <$> get <*> get <*> get <*> get <*> get