{"action":"closed","number":79,"pull_request":{"url":"https://api.github.com/repos/andyscott/droste/pulls/79","id":219682484,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NjgyNDg0","html_url":"https://github.com/andyscott/droste/pull/79","diff_url":"https://github.com/andyscott/droste/pull/79.diff","patch_url":"https://github.com/andyscott/droste/pull/79.patch","issue_url":"https://api.github.com/repos/andyscott/droste/issues/79","number":79,"state":"closed","locked":false,"title":"Add unapply methods for data types","user":{"login":"ceedubs","id":977929,"node_id":"MDQ6VXNlcjk3NzkyOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/977929?v=4","gravatar_id":"","url":"https://api.github.com/users/ceedubs","html_url":"https://github.com/ceedubs","followers_url":"https://api.github.com/users/ceedubs/followers","following_url":"https://api.github.com/users/ceedubs/following{/other_user}","gists_url":"https://api.github.com/users/ceedubs/gists{/gist_id}","starred_url":"https://api.github.com/users/ceedubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceedubs/subscriptions","organizations_url":"https://api.github.com/users/ceedubs/orgs","repos_url":"https://api.github.com/users/ceedubs/repos","events_url":"https://api.github.com/users/ceedubs/events{/privacy}","received_events_url":"https://api.github.com/users/ceedubs/received_events","type":"User","site_admin":false},"body":"In a project that I'm working on, I found these unapply methods helpful\r\nwhen matching on nested structures to apply optimizations.\r\n\r\nI didn't see any existing `Gen` instances for `Coattr` or `CoattrF` so I\r\nwrote my own. I'm not too sure about the `Coattr` instance; please take\r\na close look at that one.\r\n\r\nI made the return types of the `unapply` methods `Some[A]` as opposed to `Option[A]` for methods that always return a `Some`. This seems a little strange, but in general this makes the pattern irrefutable so the exhaustiveness checker knows that it can't fail. I'm unsure whether that matters for the types that are macro-based newtypes, but it seemed like the right thing to do? ","created_at":"2018-10-02T12:17:35Z","updated_at":"2018-10-07T18:07:23Z","closed_at":"2018-10-07T18:07:23Z","merged_at":"2018-10-07T18:07:22Z","merge_commit_sha":"667ed39cb375bd1ce1c0e15b2b25653555188d7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andyscott/droste/pulls/79/commits","review_comments_url":"https://api.github.com/repos/andyscott/droste/pulls/79/comments","review_comment_url":"https://api.github.com/repos/andyscott/droste/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andyscott/droste/issues/79/comments","statuses_url":"https://api.github.com/repos/andyscott/droste/statuses/81381b40543963a1d713efcb34d6fd6d99492685","head":{"label":"ceedubs:unapply","ref":"unapply","sha":"81381b40543963a1d713efcb34d6fd6d99492685","user":{"login":"ceedubs","id":977929,"node_id":"MDQ6VXNlcjk3NzkyOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/977929?v=4","gravatar_id":"","url":"https://api.github.com/users/ceedubs","html_url":"https://github.com/ceedubs","followers_url":"https://api.github.com/users/ceedubs/followers","following_url":"https://api.github.com/users/ceedubs/following{/other_user}","gists_url":"https://api.github.com/users/ceedubs/gists{/gist_id}","starred_url":"https://api.github.com/users/ceedubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceedubs/subscriptions","organizations_url":"https://api.github.com/users/ceedubs/orgs","repos_url":"https://api.github.com/users/ceedubs/repos","events_url":"https://api.github.com/users/ceedubs/events{/privacy}","received_events_url":"https://api.github.com/users/ceedubs/received_events","type":"User","site_admin":false},"repo":{"id":147452385,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc0NTIzODU=","name":"droste","full_name":"ceedubs/droste","private":false,"owner":{"login":"ceedubs","id":977929,"node_id":"MDQ6VXNlcjk3NzkyOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/977929?v=4","gravatar_id":"","url":"https://api.github.com/users/ceedubs","html_url":"https://github.com/ceedubs","followers_url":"https://api.github.com/users/ceedubs/followers","following_url":"https://api.github.com/users/ceedubs/following{/other_user}","gists_url":"https://api.github.com/users/ceedubs/gists{/gist_id}","starred_url":"https://api.github.com/users/ceedubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceedubs/subscriptions","organizations_url":"https://api.github.com/users/ceedubs/orgs","repos_url":"https://api.github.com/users/ceedubs/repos","events_url":"https://api.github.com/users/ceedubs/events{/privacy}","received_events_url":"https://api.github.com/users/ceedubs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ceedubs/droste","description":"to iterate is human, to recurse, divine","fork":true,"url":"https://api.github.com/repos/ceedubs/droste","forks_url":"https://api.github.com/repos/ceedubs/droste/forks","keys_url":"https://api.github.com/repos/ceedubs/droste/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceedubs/droste/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceedubs/droste/teams","hooks_url":"https://api.github.com/repos/ceedubs/droste/hooks","issue_events_url":"https://api.github.com/repos/ceedubs/droste/issues/events{/number}","events_url":"https://api.github.com/repos/ceedubs/droste/events","assignees_url":"https://api.github.com/repos/ceedubs/droste/assignees{/user}","branches_url":"https://api.github.com/repos/ceedubs/droste/branches{/branch}","tags_url":"https://api.github.com/repos/ceedubs/droste/tags","blobs_url":"https://api.github.com/repos/ceedubs/droste/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceedubs/droste/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceedubs/droste/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceedubs/droste/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceedubs/droste/statuses/{sha}","languages_url":"https://api.github.com/repos/ceedubs/droste/languages","stargazers_url":"https://api.github.com/repos/ceedubs/droste/stargazers","contributors_url":"https://api.github.com/repos/ceedubs/droste/contributors","subscribers_url":"https://api.github.com/repos/ceedubs/droste/subscribers","subscription_url":"https://api.github.com/repos/ceedubs/droste/subscription","commits_url":"https://api.github.com/repos/ceedubs/droste/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceedubs/droste/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceedubs/droste/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceedubs/droste/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceedubs/droste/contents/{+path}","compare_url":"https://api.github.com/repos/ceedubs/droste/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceedubs/droste/merges","archive_url":"https://api.github.com/repos/ceedubs/droste/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceedubs/droste/downloads","issues_url":"https://api.github.com/repos/ceedubs/droste/issues{/number}","pulls_url":"https://api.github.com/repos/ceedubs/droste/pulls{/number}","milestones_url":"https://api.github.com/repos/ceedubs/droste/milestones{/number}","notifications_url":"https://api.github.com/repos/ceedubs/droste/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceedubs/droste/labels{/name}","releases_url":"https://api.github.com/repos/ceedubs/droste/releases{/id}","deployments_url":"https://api.github.com/repos/ceedubs/droste/deployments","created_at":"2018-09-05T03:07:58Z","updated_at":"2018-09-05T03:08:00Z","pushed_at":"2018-10-02T12:13:23Z","git_url":"git://github.com/ceedubs/droste.git","ssh_url":"git@github.com:ceedubs/droste.git","clone_url":"https://github.com/ceedubs/droste.git","svn_url":"https://github.com/ceedubs/droste","homepage":"","size":359,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"andyscott:master","ref":"master","sha":"4cf90e183007d595b770d9f15f206c52f91d23d0","user":{"login":"andyscott","id":310363,"node_id":"MDQ6VXNlcjMxMDM2Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/310363?v=4","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"repo":{"id":117213612,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcyMTM2MTI=","name":"droste","full_name":"andyscott/droste","private":false,"owner":{"login":"andyscott","id":310363,"node_id":"MDQ6VXNlcjMxMDM2Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/310363?v=4","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"html_url":"https://github.com/andyscott/droste","description":"to iterate is human, to recurse, divine","fork":false,"url":"https://api.github.com/repos/andyscott/droste","forks_url":"https://api.github.com/repos/andyscott/droste/forks","keys_url":"https://api.github.com/repos/andyscott/droste/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyscott/droste/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyscott/droste/teams","hooks_url":"https://api.github.com/repos/andyscott/droste/hooks","issue_events_url":"https://api.github.com/repos/andyscott/droste/issues/events{/number}","events_url":"https://api.github.com/repos/andyscott/droste/events","assignees_url":"https://api.github.com/repos/andyscott/droste/assignees{/user}","branches_url":"https://api.github.com/repos/andyscott/droste/branches{/branch}","tags_url":"https://api.github.com/repos/andyscott/droste/tags","blobs_url":"https://api.github.com/repos/andyscott/droste/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyscott/droste/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyscott/droste/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyscott/droste/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyscott/droste/statuses/{sha}","languages_url":"https://api.github.com/repos/andyscott/droste/languages","stargazers_url":"https://api.github.com/repos/andyscott/droste/stargazers","contributors_url":"https://api.github.com/repos/andyscott/droste/contributors","subscribers_url":"https://api.github.com/repos/andyscott/droste/subscribers","subscription_url":"https://api.github.com/repos/andyscott/droste/subscription","commits_url":"https://api.github.com/repos/andyscott/droste/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyscott/droste/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyscott/droste/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyscott/droste/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyscott/droste/contents/{+path}","compare_url":"https://api.github.com/repos/andyscott/droste/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyscott/droste/merges","archive_url":"https://api.github.com/repos/andyscott/droste/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyscott/droste/downloads","issues_url":"https://api.github.com/repos/andyscott/droste/issues{/number}","pulls_url":"https://api.github.com/repos/andyscott/droste/pulls{/number}","milestones_url":"https://api.github.com/repos/andyscott/droste/milestones{/number}","notifications_url":"https://api.github.com/repos/andyscott/droste/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyscott/droste/labels{/name}","releases_url":"https://api.github.com/repos/andyscott/droste/releases{/id}","deployments_url":"https://api.github.com/repos/andyscott/droste/deployments","created_at":"2018-01-12T08:17:00Z","updated_at":"2018-10-07T18:02:34Z","pushed_at":"2018-10-07T18:07:22Z","git_url":"git://github.com/andyscott/droste.git","ssh_url":"git@github.com:andyscott/droste.git","clone_url":"https://github.com/andyscott/droste.git","svn_url":"https://github.com/andyscott/droste","homepage":"","size":345,"stargazers_count":86,"watchers_count":86,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":10,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andyscott/droste/pulls/79"},"html":{"href":"https://github.com/andyscott/droste/pull/79"},"issue":{"href":"https://api.github.com/repos/andyscott/droste/issues/79"},"comments":{"href":"https://api.github.com/repos/andyscott/droste/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/andyscott/droste/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/andyscott/droste/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andyscott/droste/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/andyscott/droste/statuses/81381b40543963a1d713efcb34d6fd6d99492685"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"andyscott","id":310363,"node_id":"MDQ6VXNlcjMxMDM2Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/310363?v=4","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":1,"additions":135,"deletions":2,"changed_files":14}}
{"actor":{"display_login":"andyscott"}}