{"action":"created","comment":{"url":"https://api.github.com/repos/non/cats/pulls/comments/37941870","id":37941870,"diff_hunk":"@@ -0,0 +1,20 @@\n+package cats\n+package syntax\n+\n+import cats.data.Xor\n+\n+trait OptionSyntax {\n+  def none[A] = Option.empty[A]\n+  implicit def toOptionSyntax[A](a: A): ToOptionOps[A] = new ToOptionOps(a)\n+  implicit def optionSyntax[A](a: Option[A]): OptionOps[A] = new OptionOps(a)\n+}\n+\n+class ToOptionOps[A](val a: A) extends AnyVal {","path":"core/src/main/scala/cats/syntax/option.scala","position":12,"original_position":12,"commit_id":"6c7d7bd7a65868325108feb1337aa0de1845212a","original_commit_id":"6c7d7bd7a65868325108feb1337aa0de1845212a","user":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"body":"This makes me think [`EitherOps`](https://github.com/non/cats/blob/d128c060b92751179276882aa375096cbad209b2/core/src/main/scala/cats/syntax/xor.scala#L10) should be `ToEitherOps` for consistency.","created_at":"2015-08-26T02:40:05Z","updated_at":"2015-08-26T02:40:05Z","html_url":"https://github.com/non/cats/pull/483#discussion_r37941870","pull_request_url":"https://api.github.com/repos/non/cats/pulls/483","_links":{"self":{"href":"https://api.github.com/repos/non/cats/pulls/comments/37941870"},"html":{"href":"https://github.com/non/cats/pull/483#discussion_r37941870"},"pull_request":{"href":"https://api.github.com/repos/non/cats/pulls/483"}}},"pull_request":{"url":"https://api.github.com/repos/non/cats/pulls/483","id":43358484,"html_url":"https://github.com/non/cats/pull/483","diff_url":"https://github.com/non/cats/pull/483.diff","patch_url":"https://github.com/non/cats/pull/483.patch","issue_url":"https://api.github.com/repos/non/cats/issues/483","number":483,"state":"open","locked":false,"title":"add a touch of OptionSyntax","user":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"body":"Is there interest in the following syntax?\r\n\r\n```scala\r\nscala> none[Int]\r\nres0: Option[Int] = None\r\n\r\nscala> 1.some\r\nres1: Option[Int] = Some(1)\r\n\r\nscala> none[Int].toRightXor(\"a\")\r\nres2: cats.data.Xor[String,Int] = Left(a)\r\n\r\nscala> 2.some.toRightXor(\"b\")\r\nres3: cats.data.Xor[String,Int] = Right(2)\r\n\r\nscala> 3.some.toLeftXor(\"c\")\r\nres4: cats.data.Xor[Int,String] = Left(3)\r\n\r\nscala> none[List[Int]].orEmpty\r\nres5: List[Int] = List()\r\n```","created_at":"2015-08-26T02:33:21Z","updated_at":"2015-08-26T02:40:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8572d86bf540b37d4efe848f2149a3b0f81dfe18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/non/cats/pulls/483/commits","review_comments_url":"https://api.github.com/repos/non/cats/pulls/483/comments","review_comment_url":"https://api.github.com/repos/non/cats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/non/cats/issues/483/comments","statuses_url":"https://api.github.com/repos/non/cats/statuses/6c7d7bd7a65868325108feb1337aa0de1845212a","head":{"label":"drostron:option-syntax","ref":"option-syntax","sha":"6c7d7bd7a65868325108feb1337aa0de1845212a","user":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"repo":{"id":41122164,"name":"cats","full_name":"drostron/cats","owner":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drostron/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":true,"url":"https://api.github.com/repos/drostron/cats","forks_url":"https://api.github.com/repos/drostron/cats/forks","keys_url":"https://api.github.com/repos/drostron/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drostron/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drostron/cats/teams","hooks_url":"https://api.github.com/repos/drostron/cats/hooks","issue_events_url":"https://api.github.com/repos/drostron/cats/issues/events{/number}","events_url":"https://api.github.com/repos/drostron/cats/events","assignees_url":"https://api.github.com/repos/drostron/cats/assignees{/user}","branches_url":"https://api.github.com/repos/drostron/cats/branches{/branch}","tags_url":"https://api.github.com/repos/drostron/cats/tags","blobs_url":"https://api.github.com/repos/drostron/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drostron/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drostron/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/drostron/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drostron/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/drostron/cats/languages","stargazers_url":"https://api.github.com/repos/drostron/cats/stargazers","contributors_url":"https://api.github.com/repos/drostron/cats/contributors","subscribers_url":"https://api.github.com/repos/drostron/cats/subscribers","subscription_url":"https://api.github.com/repos/drostron/cats/subscription","commits_url":"https://api.github.com/repos/drostron/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/drostron/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/drostron/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/drostron/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/drostron/cats/contents/{+path}","compare_url":"https://api.github.com/repos/drostron/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drostron/cats/merges","archive_url":"https://api.github.com/repos/drostron/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drostron/cats/downloads","issues_url":"https://api.github.com/repos/drostron/cats/issues{/number}","pulls_url":"https://api.github.com/repos/drostron/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/drostron/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/drostron/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drostron/cats/labels{/name}","releases_url":"https://api.github.com/repos/drostron/cats/releases{/id}","created_at":"2015-08-20T22:42:53Z","updated_at":"2015-08-20T22:42:54Z","pushed_at":"2015-08-26T02:04:51Z","git_url":"git://github.com/drostron/cats.git","ssh_url":"git@github.com:drostron/cats.git","clone_url":"https://github.com/drostron/cats.git","svn_url":"https://github.com/drostron/cats","homepage":"http://non.github.io/cats/","size":4050,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"non:master","ref":"master","sha":"d128c060b92751179276882aa375096cbad209b2","user":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"repo":{"id":29986727,"name":"cats","full_name":"non/cats","owner":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/non/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":false,"url":"https://api.github.com/repos/non/cats","forks_url":"https://api.github.com/repos/non/cats/forks","keys_url":"https://api.github.com/repos/non/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/non/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/non/cats/teams","hooks_url":"https://api.github.com/repos/non/cats/hooks","issue_events_url":"https://api.github.com/repos/non/cats/issues/events{/number}","events_url":"https://api.github.com/repos/non/cats/events","assignees_url":"https://api.github.com/repos/non/cats/assignees{/user}","branches_url":"https://api.github.com/repos/non/cats/branches{/branch}","tags_url":"https://api.github.com/repos/non/cats/tags","blobs_url":"https://api.github.com/repos/non/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/non/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/non/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/non/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/non/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/non/cats/languages","stargazers_url":"https://api.github.com/repos/non/cats/stargazers","contributors_url":"https://api.github.com/repos/non/cats/contributors","subscribers_url":"https://api.github.com/repos/non/cats/subscribers","subscription_url":"https://api.github.com/repos/non/cats/subscription","commits_url":"https://api.github.com/repos/non/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/non/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/non/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/non/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/non/cats/contents/{+path}","compare_url":"https://api.github.com/repos/non/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/non/cats/merges","archive_url":"https://api.github.com/repos/non/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/non/cats/downloads","issues_url":"https://api.github.com/repos/non/cats/issues{/number}","pulls_url":"https://api.github.com/repos/non/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/non/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/non/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/non/cats/labels{/name}","releases_url":"https://api.github.com/repos/non/cats/releases{/id}","created_at":"2015-01-28T20:26:48Z","updated_at":"2015-08-25T15:37:36Z","pushed_at":"2015-08-26T02:33:21Z","git_url":"git://github.com/non/cats.git","ssh_url":"git@github.com:non/cats.git","clone_url":"https://github.com/non/cats.git","svn_url":"https://github.com/non/cats","homepage":"http://non.github.io/cats/","size":6657,"stargazers_count":543,"watchers_count":543,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":106,"mirror_url":null,"open_issues_count":61,"forks":106,"open_issues":61,"watchers":543,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/non/cats/pulls/483"},"html":{"href":"https://github.com/non/cats/pull/483"},"issue":{"href":"https://api.github.com/repos/non/cats/issues/483"},"comments":{"href":"https://api.github.com/repos/non/cats/issues/483/comments"},"review_comments":{"href":"https://api.github.com/repos/non/cats/pulls/483/comments"},"review_comment":{"href":"https://api.github.com/repos/non/cats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/non/cats/pulls/483/commits"},"statuses":{"href":"https://api.github.com/repos/non/cats/statuses/6c7d7bd7a65868325108feb1337aa0de1845212a"}}}}