{"action":"created","comment":{"url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/comments/169793672","pull_request_review_id":98379357,"id":169793672,"diff_hunk":"@@ -127,3 +132,10 @@ hoistEitherT :: (forall b. m b -> n b) -> EitherT x m a -> EitherT x n a\n hoistEitherT f =\n   EitherT . f . runEitherT\n {-# INLINE hoistEitherT #-}\n+\n+-- | Try an IO action inside an EitherT. If the IO action throws an IOException,\n+-- wrap it with the provided handler and return it as a Left inside EitherT.\n+tryIOEitherT :: MonadIO m => (IOException -> x) -> IO a -> EitherT x m a\n+tryIOEitherT handler =","path":"src/Control/Monad/Trans/Either.hs","position":null,"original_position":30,"commit_id":"4adcbe0593fed0667bcb063c3646daaa9271c5e9","original_commit_id":"d6cd0ca2a1c022cc15a0ceec3688bd1c29abac57","user":{"login":"tmcgilchrist","id":170937,"avatar_url":"https://avatars1.githubusercontent.com/u/170937?v=4","gravatar_id":"","url":"https://api.github.com/users/tmcgilchrist","html_url":"https://github.com/tmcgilchrist","followers_url":"https://api.github.com/users/tmcgilchrist/followers","following_url":"https://api.github.com/users/tmcgilchrist/following{/other_user}","gists_url":"https://api.github.com/users/tmcgilchrist/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgilchrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgilchrist/subscriptions","organizations_url":"https://api.github.com/users/tmcgilchrist/orgs","repos_url":"https://api.github.com/users/tmcgilchrist/repos","events_url":"https://api.github.com/users/tmcgilchrist/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgilchrist/received_events","type":"User","site_admin":false},"body":"@nhibberd name it`handleIOEitherT` in line with the `handle` function in `Control.Exception`? I can dig that.\r\n\r\nThe potentially unsafe `tryEitherT` from x-either might be useful with a large documentation warning about bad ideas @erikd if you want to add that here.","created_at":"2018-02-21T22:07:31Z","updated_at":"2018-02-21T22:07:31Z","html_url":"https://github.com/tmcgilchrist/transformers-either/pull/4#discussion_r169793672","pull_request_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/comments/169793672"},"html":{"href":"https://github.com/tmcgilchrist/transformers-either/pull/4#discussion_r169793672"},"pull_request":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4"}},"in_reply_to_id":169786455},"pull_request":{"url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4","id":170595060,"html_url":"https://github.com/tmcgilchrist/transformers-either/pull/4","diff_url":"https://github.com/tmcgilchrist/transformers-either/pull/4.diff","patch_url":"https://github.com/tmcgilchrist/transformers-either/pull/4.patch","issue_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/4","number":4,"state":"open","locked":false,"title":"Add tryIOEitherT","user":{"login":"erikd","id":307277,"avatar_url":"https://avatars0.githubusercontent.com/u/307277?v=4","gravatar_id":"","url":"https://api.github.com/users/erikd","html_url":"https://github.com/erikd","followers_url":"https://api.github.com/users/erikd/followers","following_url":"https://api.github.com/users/erikd/following{/other_user}","gists_url":"https://api.github.com/users/erikd/gists{/gist_id}","starred_url":"https://api.github.com/users/erikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikd/subscriptions","organizations_url":"https://api.github.com/users/erikd/orgs","repos_url":"https://api.github.com/users/erikd/repos","events_url":"https://api.github.com/users/erikd/events{/privacy}","received_events_url":"https://api.github.com/users/erikd/received_events","type":"User","site_admin":false},"body":"Try an IO action inside an EitherT. If the IO action throws an IOException,\r\nwrap it with the provided handler and return it as a Left inside EitherT.","created_at":"2018-02-21T21:36:19Z","updated_at":"2018-02-21T22:07:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"643e498859231874d826a3b7ee6e553b4077b8e3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4/commits","review_comments_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4/comments","review_comment_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/4/comments","statuses_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/statuses/4adcbe0593fed0667bcb063c3646daaa9271c5e9","head":{"label":"erikd:topic/tryIOEitherT","ref":"topic/tryIOEitherT","sha":"4adcbe0593fed0667bcb063c3646daaa9271c5e9","user":{"login":"erikd","id":307277,"avatar_url":"https://avatars0.githubusercontent.com/u/307277?v=4","gravatar_id":"","url":"https://api.github.com/users/erikd","html_url":"https://github.com/erikd","followers_url":"https://api.github.com/users/erikd/followers","following_url":"https://api.github.com/users/erikd/following{/other_user}","gists_url":"https://api.github.com/users/erikd/gists{/gist_id}","starred_url":"https://api.github.com/users/erikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikd/subscriptions","organizations_url":"https://api.github.com/users/erikd/orgs","repos_url":"https://api.github.com/users/erikd/repos","events_url":"https://api.github.com/users/erikd/events{/privacy}","received_events_url":"https://api.github.com/users/erikd/received_events","type":"User","site_admin":false},"repo":{"id":117401381,"name":"transformers-either","full_name":"erikd/transformers-either","owner":{"login":"erikd","id":307277,"avatar_url":"https://avatars0.githubusercontent.com/u/307277?v=4","gravatar_id":"","url":"https://api.github.com/users/erikd","html_url":"https://github.com/erikd","followers_url":"https://api.github.com/users/erikd/followers","following_url":"https://api.github.com/users/erikd/following{/other_user}","gists_url":"https://api.github.com/users/erikd/gists{/gist_id}","starred_url":"https://api.github.com/users/erikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikd/subscriptions","organizations_url":"https://api.github.com/users/erikd/orgs","repos_url":"https://api.github.com/users/erikd/repos","events_url":"https://api.github.com/users/erikd/events{/privacy}","received_events_url":"https://api.github.com/users/erikd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikd/transformers-either","description":"transformers-either","fork":true,"url":"https://api.github.com/repos/erikd/transformers-either","forks_url":"https://api.github.com/repos/erikd/transformers-either/forks","keys_url":"https://api.github.com/repos/erikd/transformers-either/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikd/transformers-either/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikd/transformers-either/teams","hooks_url":"https://api.github.com/repos/erikd/transformers-either/hooks","issue_events_url":"https://api.github.com/repos/erikd/transformers-either/issues/events{/number}","events_url":"https://api.github.com/repos/erikd/transformers-either/events","assignees_url":"https://api.github.com/repos/erikd/transformers-either/assignees{/user}","branches_url":"https://api.github.com/repos/erikd/transformers-either/branches{/branch}","tags_url":"https://api.github.com/repos/erikd/transformers-either/tags","blobs_url":"https://api.github.com/repos/erikd/transformers-either/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikd/transformers-either/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikd/transformers-either/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikd/transformers-either/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikd/transformers-either/statuses/{sha}","languages_url":"https://api.github.com/repos/erikd/transformers-either/languages","stargazers_url":"https://api.github.com/repos/erikd/transformers-either/stargazers","contributors_url":"https://api.github.com/repos/erikd/transformers-either/contributors","subscribers_url":"https://api.github.com/repos/erikd/transformers-either/subscribers","subscription_url":"https://api.github.com/repos/erikd/transformers-either/subscription","commits_url":"https://api.github.com/repos/erikd/transformers-either/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikd/transformers-either/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikd/transformers-either/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikd/transformers-either/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikd/transformers-either/contents/{+path}","compare_url":"https://api.github.com/repos/erikd/transformers-either/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikd/transformers-either/merges","archive_url":"https://api.github.com/repos/erikd/transformers-either/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikd/transformers-either/downloads","issues_url":"https://api.github.com/repos/erikd/transformers-either/issues{/number}","pulls_url":"https://api.github.com/repos/erikd/transformers-either/pulls{/number}","milestones_url":"https://api.github.com/repos/erikd/transformers-either/milestones{/number}","notifications_url":"https://api.github.com/repos/erikd/transformers-either/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikd/transformers-either/labels{/name}","releases_url":"https://api.github.com/repos/erikd/transformers-either/releases{/id}","deployments_url":"https://api.github.com/repos/erikd/transformers-either/deployments","created_at":"2018-01-14T04:25:41Z","updated_at":"2018-01-14T04:25:43Z","pushed_at":"2018-02-21T21:57:54Z","git_url":"git://github.com/erikd/transformers-either.git","ssh_url":"git@github.com:erikd/transformers-either.git","clone_url":"https://github.com/erikd/transformers-either.git","svn_url":"https://github.com/erikd/transformers-either","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tmcgilchrist:master","ref":"master","sha":"fc88fb80ad0848795881394dd78c05ca76905d8c","user":{"login":"tmcgilchrist","id":170937,"avatar_url":"https://avatars1.githubusercontent.com/u/170937?v=4","gravatar_id":"","url":"https://api.github.com/users/tmcgilchrist","html_url":"https://github.com/tmcgilchrist","followers_url":"https://api.github.com/users/tmcgilchrist/followers","following_url":"https://api.github.com/users/tmcgilchrist/following{/other_user}","gists_url":"https://api.github.com/users/tmcgilchrist/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgilchrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgilchrist/subscriptions","organizations_url":"https://api.github.com/users/tmcgilchrist/orgs","repos_url":"https://api.github.com/users/tmcgilchrist/repos","events_url":"https://api.github.com/users/tmcgilchrist/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgilchrist/received_events","type":"User","site_admin":false},"repo":{"id":112117204,"name":"transformers-either","full_name":"tmcgilchrist/transformers-either","owner":{"login":"tmcgilchrist","id":170937,"avatar_url":"https://avatars1.githubusercontent.com/u/170937?v=4","gravatar_id":"","url":"https://api.github.com/users/tmcgilchrist","html_url":"https://github.com/tmcgilchrist","followers_url":"https://api.github.com/users/tmcgilchrist/followers","following_url":"https://api.github.com/users/tmcgilchrist/following{/other_user}","gists_url":"https://api.github.com/users/tmcgilchrist/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgilchrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgilchrist/subscriptions","organizations_url":"https://api.github.com/users/tmcgilchrist/orgs","repos_url":"https://api.github.com/users/tmcgilchrist/repos","events_url":"https://api.github.com/users/tmcgilchrist/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgilchrist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmcgilchrist/transformers-either","description":"transformers-either","fork":false,"url":"https://api.github.com/repos/tmcgilchrist/transformers-either","forks_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/forks","keys_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/teams","hooks_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/hooks","issue_events_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/events{/number}","events_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/events","assignees_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/assignees{/user}","branches_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/branches{/branch}","tags_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/tags","blobs_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/statuses/{sha}","languages_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/languages","stargazers_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/stargazers","contributors_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/contributors","subscribers_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/subscribers","subscription_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/subscription","commits_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/contents/{+path}","compare_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/merges","archive_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/downloads","issues_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues{/number}","pulls_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls{/number}","milestones_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/milestones{/number}","notifications_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/labels{/name}","releases_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/releases{/id}","deployments_url":"https://api.github.com/repos/tmcgilchrist/transformers-either/deployments","created_at":"2017-11-26T21:14:46Z","updated_at":"2018-02-09T04:42:40Z","pushed_at":"2018-02-21T21:57:56Z","git_url":"git://github.com/tmcgilchrist/transformers-either.git","ssh_url":"git@github.com:tmcgilchrist/transformers-either.git","clone_url":"https://github.com/tmcgilchrist/transformers-either.git","svn_url":"https://github.com/tmcgilchrist/transformers-either","homepage":null,"size":8,"stargazers_count":1,"watchers_count":1,"language":"Haskell","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4"},"html":{"href":"https://github.com/tmcgilchrist/transformers-either/pull/4"},"issue":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/4"},"comments":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/tmcgilchrist/transformers-either/statuses/4adcbe0593fed0667bcb063c3646daaa9271c5e9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tmcgilchrist"}}