{"action":"created","issue":{"url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/274","repository_url":"https://api.github.com/repos/haskell-distributed/distributed-process","labels_url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/274/comments","events_url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/274/events","html_url":"https://github.com/haskell-distributed/distributed-process/pull/274","id":136175431,"number":274,"title":"Implement MonadCatch, MonadThrow, MonadMask for Process.","user":{"login":"qnikst","id":170227,"avatar_url":"https://avatars.githubusercontent.com/u/170227?v=3","gravatar_id":"","url":"https://api.github.com/users/qnikst","html_url":"https://github.com/qnikst","followers_url":"https://api.github.com/users/qnikst/followers","following_url":"https://api.github.com/users/qnikst/following{/other_user}","gists_url":"https://api.github.com/users/qnikst/gists{/gist_id}","starred_url":"https://api.github.com/users/qnikst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qnikst/subscriptions","organizations_url":"https://api.github.com/users/qnikst/orgs","repos_url":"https://api.github.com/users/qnikst/repos","events_url":"https://api.github.com/users/qnikst/events{/privacy}","received_events_url":"https://api.github.com/users/qnikst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell-distributed/distributed-process/labels/enhancement","name":"enhancement","color":"0052cc"},{"url":"https://api.github.com/repos/haskell-distributed/distributed-process/labels/In%20Progress","name":"In Progress","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T20:17:34Z","updated_at":"2016-02-27T18:52:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haskell-distributed/distributed-process/pulls/274","html_url":"https://github.com/haskell-distributed/distributed-process/pull/274","diff_url":"https://github.com/haskell-distributed/distributed-process/pull/274.diff","patch_url":"https://github.com/haskell-distributed/distributed-process/pull/274.patch"},"body":"Implements monad catch family for process monad, this heavily simplifies implementation of the different exception handling methods and simplify writing more general code."},"comment":{"url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/comments/189701605","html_url":"https://github.com/haskell-distributed/distributed-process/pull/274#issuecomment-189701605","issue_url":"https://api.github.com/repos/haskell-distributed/distributed-process/issues/274","id":189701605,"user":{"login":"qnikst","id":170227,"avatar_url":"https://avatars.githubusercontent.com/u/170227?v=3","gravatar_id":"","url":"https://api.github.com/users/qnikst","html_url":"https://github.com/qnikst","followers_url":"https://api.github.com/users/qnikst/followers","following_url":"https://api.github.com/users/qnikst/following{/other_user}","gists_url":"https://api.github.com/users/qnikst/gists{/gist_id}","starred_url":"https://api.github.com/users/qnikst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qnikst/subscriptions","organizations_url":"https://api.github.com/users/qnikst/orgs","repos_url":"https://api.github.com/users/qnikst/repos","events_url":"https://api.github.com/users/qnikst/events{/privacy}","received_events_url":"https://api.github.com/users/qnikst/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T18:52:37Z","updated_at":"2016-02-27T18:52:37Z","body":"This change doesn't introduce any change in semantics or how primitives works (at least currently). So all the code that was correct before this patch is still correct after this patch and will have exactly the same semantics.\r\nAs an additional benefit it will allow to use primitives from other libraries (e.g. `exceptions`) for `Process` monad. For example: `withLock` from d-p extras can be implemented as:\r\n```\r\n+withLock :: (Exclusive e, MonadMask m, MonadIO m) => e -> m a -> m a\r\n+withLock excl = bracket_ (liftIO $ acquire excl)\r\n+                         (liftIO $ release excl)\r\n```\r\nthis will generalize both `withLock` and `withLockP` and will not have several races that exists in current code in presence of exceptions.\r\n\r\nI think we need to add changes to changelog only, this code should go in next major release, i.e. 0.7, (I don't expect that to happen really soon)."}}