@@ -887,9 +887,8 @@ monitor = monitor' . ProcessIdentifier
887-- @withMonitor@ returns, there might still be unreceived monitor
887-- @withMonitor@ returns, there might still be unreceived monitor
888-- messages in the queue.
888-- messages in the queue.
890−withMonitor :: ProcessId -> Process a -> Process a
890+withMonitor :: ProcessId -> (MonitorRef -> Process a) -> Process a
891−withMonitor pid = bracket (monitor pid) unmonitor . const
891+withMonitor pid = bracket (monitor pid) unmonitor
892−{-# WARNING withMonitor "Signature of this function will be changed to 'ProcessId -> (MonitorRef -> Process a) -> Process a' in the next release, for stable behaviour use withMonitor_" #-}
894-- | Establishes temporary monitoring of another process.
893-- | Establishes temporary monitoring of another process.
@@ -900,7 +899,7 @@ withMonitor pid = bracket (monitor pid) unmonitor . const
901-- Since 0.6.1
900-- Since 0.6.1
902withMonitor_ :: ProcessId -> Process a -> Process a
901withMonitor_ :: ProcessId -> Process a -> Process a
903−withMonitor_ = withMonitor
902+withMonitor_ p = withMonitor p . const
905-- | Remove a link
904-- | Remove a link