@@ -512,9 +512,11 @@ data PortLinkException =
513-- | Exception thrown when a process attempts to register
513-- | Exception thrown when a process attempts to register
514-- a process under an already-registered name or to
514-- 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,
516data ProcessRegistrationException =
518data ProcessRegistrationException =
517− ProcessRegistrationException !String
519+ ProcessRegistrationException !String !(Maybe ProcessId)
518 deriving (Typeable, Show)
520 deriving (Typeable, Show)
520-- | Internal exception thrown indirectly by 'exit'
522-- | Internal exception thrown indirectly by 'exit'
@@ -579,7 +581,7 @@ data WhereIsReply = WhereIsReply String (Maybe ProcessId)
579 deriving (Show, Typeable)
581 deriving (Show, Typeable)
581-- | (Asynchronous) reply from 'register' and 'unregister'
583-- | (Asynchronous) reply from 'register' and 'unregister'
582−data RegisterReply = RegisterReply String Bool
584+data RegisterReply = RegisterReply String Bool (Maybe ProcessId)
583 deriving (Show, Typeable)
585 deriving (Show, Typeable)
585data NodeStats = NodeStats {
587data NodeStats = NodeStats {
@@ -748,8 +750,8 @@ instance Binary WhereIsReply where
748 get = WhereIsReply <$> get <*> get
750 get = WhereIsReply <$> get <*> get
750instance Binary RegisterReply where
752instance Binary RegisterReply where
751− put (RegisterReply label ok) = put label >> put ok
753+ put (RegisterReply label ok owner) = put label >> put ok >> put owner
752− get = RegisterReply <$> get <*> get
754+ get = RegisterReply <$> get <*> get <*> get
754instance Binary ProcessInfo where
756instance Binary ProcessInfo where
755 get = ProcessInfo <$> get <*> get <*> get <*> get <*> get
757 get = ProcessInfo <$> get <*> get <*> get <*> get <*> get