{"action":"created","comment":{"url":"https://api.github.com/repos/typelevel/cats/pulls/comments/196570771","pull_request_review_id":130150555,"id":196570771,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjU3MDc3MQ==","diff_hunk":"@@ -0,0 +1,84 @@\n+package cats\n+\n+/**\n+ * Representable.\n+ *\n+ * Is a witness to the isomorphism forall A. F[A] <-> Representation => A\n+ *\n+ * Must obey the laws defined in cats.laws.RepresentableLaws\n+ * i.e.\n+ * tabulate andThen index = identity\n+ * index andThen tabulate = identity\n+ *\n+ * Inspired by the Haskell representable package\n+ * http://hackage.haskell.org/package/representable-functors-3.2.0.2/docs/Data-Functor-Representable.html\n+ */\n+trait Representable[F[_]] extends Serializable {\n+\n+  def F: Functor[F]\n+\n+  type Representation\n+\n+  /**\n+   * Create a function that \"indexes\" into the `F` structure using `Representation`\n+   */\n+  def index[A](f: F[A]): Representation => A\n+\n+  /**\n+   * Reconstructs the `F` structure using the index function\n+   */\n+  def tabulate[A](f: Representation => A): F[A]\n+}\n+\n+private[cats] sealed abstract class RepresentableInstances0 extends RepresentableInstances1 {\n+  def catsRepresentableIsBimonad[F[_], R](implicit Rep: Representable.Aux[F, R], Mon: Monoid[R]): Bimonad[F] = new RepresentableBimonad[F, R] {\n+    override def R: Representable.Aux[F, R] = Rep\n+    override def M: Monoid[R] = Mon\n+  }\n+}\n+\n+private[cats] sealed abstract class RepresentableInstances1 {\n+  def catsRepresentableIsMonad[F[_], R](implicit Rep: Representable.Aux[F, R]): Monad[F] = new RepresentableMonad[F, R] {","path":"core/src/main/scala/cats/Representable.scala","position":41,"original_position":41,"commit_id":"f9dd8af804a93e7868eb184490667726b59c68d4","original_commit_id":"f9dd8af804a93e7868eb184490667726b59c68d4","user":{"login":"kailuowang","id":83257,"node_id":"MDQ6VXNlcjgzMjU3","avatar_url":"https://avatars3.githubusercontent.com/u/83257?v=4","gravatar_id":"","url":"https://api.github.com/users/kailuowang","html_url":"https://github.com/kailuowang","followers_url":"https://api.github.com/users/kailuowang/followers","following_url":"https://api.github.com/users/kailuowang/following{/other_user}","gists_url":"https://api.github.com/users/kailuowang/gists{/gist_id}","starred_url":"https://api.github.com/users/kailuowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kailuowang/subscriptions","organizations_url":"https://api.github.com/users/kailuowang/orgs","repos_url":"https://api.github.com/users/kailuowang/repos","events_url":"https://api.github.com/users/kailuowang/events{/privacy}","received_events_url":"https://api.github.com/users/kailuowang/received_events","type":"User","site_admin":false},"body":"This and the one above are not implicit and not much point to be imported and thus no need to follow the implicits naming convention. If we want them to be available for auto derivation of `Bimonad` and `Monad` we need to put them in a trait extendable by `cats.implicits` and better have some tests for potential conflicts. I vote for just rename them to better searchable if there aren't many real world use cases for them. ","created_at":"2018-06-19T20:41:17Z","updated_at":"2018-06-19T20:41:17Z","html_url":"https://github.com/typelevel/cats/pull/2284#discussion_r196570771","pull_request_url":"https://api.github.com/repos/typelevel/cats/pulls/2284","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments/196570771"},"html":{"href":"https://github.com/typelevel/cats/pull/2284#discussion_r196570771"},"pull_request":{"href":"https://api.github.com/repos/typelevel/cats/pulls/2284"}}},"pull_request":{"url":"https://api.github.com/repos/typelevel/cats/pulls/2284","id":193301622,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMzAxNjIy","html_url":"https://github.com/typelevel/cats/pull/2284","diff_url":"https://github.com/typelevel/cats/pull/2284.diff","patch_url":"https://github.com/typelevel/cats/pull/2284.patch","issue_url":"https://api.github.com/repos/typelevel/cats/issues/2284","number":2284,"state":"open","locked":false,"title":"Add Representable Functor","user":{"login":"eli-jordan","id":326125,"node_id":"MDQ6VXNlcjMyNjEyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/326125?v=4","gravatar_id":"","url":"https://api.github.com/users/eli-jordan","html_url":"https://github.com/eli-jordan","followers_url":"https://api.github.com/users/eli-jordan/followers","following_url":"https://api.github.com/users/eli-jordan/following{/other_user}","gists_url":"https://api.github.com/users/eli-jordan/gists{/gist_id}","starred_url":"https://api.github.com/users/eli-jordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eli-jordan/subscriptions","organizations_url":"https://api.github.com/users/eli-jordan/orgs","repos_url":"https://api.github.com/users/eli-jordan/repos","events_url":"https://api.github.com/users/eli-jordan/events{/privacy}","received_events_url":"https://api.github.com/users/eli-jordan/received_events","type":"User","site_admin":false},"body":"I have been working on adding representable functors to cats.\r\n\r\nThis PR adds;\r\n\r\n- The `Representable` typeclass.\r\n- The `RepresentableStore` data type, which is a generalisation of the `Store` comonad.\r\n","created_at":"2018-06-07T12:19:28Z","updated_at":"2018-06-19T20:41:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e525e98c615d1dcd53e2ba83ea4445a94bbe550a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/typelevel/cats/milestones/9","html_url":"https://github.com/typelevel/cats/milestone/9","labels_url":"https://api.github.com/repos/typelevel/cats/milestones/9/labels","id":3387616,"node_id":"MDk6TWlsZXN0b25lMzM4NzYxNg==","number":9,"title":"1.2","description":"","creator":{"login":"kailuowang","id":83257,"node_id":"MDQ6VXNlcjgzMjU3","avatar_url":"https://avatars3.githubusercontent.com/u/83257?v=4","gravatar_id":"","url":"https://api.github.com/users/kailuowang","html_url":"https://github.com/kailuowang","followers_url":"https://api.github.com/users/kailuowang/followers","following_url":"https://api.github.com/users/kailuowang/following{/other_user}","gists_url":"https://api.github.com/users/kailuowang/gists{/gist_id}","starred_url":"https://api.github.com/users/kailuowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kailuowang/subscriptions","organizations_url":"https://api.github.com/users/kailuowang/orgs","repos_url":"https://api.github.com/users/kailuowang/repos","events_url":"https://api.github.com/users/kailuowang/events{/privacy}","received_events_url":"https://api.github.com/users/kailuowang/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":40,"state":"open","created_at":"2018-05-30T14:23:43Z","updated_at":"2018-06-19T20:22:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/typelevel/cats/pulls/2284/commits","review_comments_url":"https://api.github.com/repos/typelevel/cats/pulls/2284/comments","review_comment_url":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/2284/comments","statuses_url":"https://api.github.com/repos/typelevel/cats/statuses/f9dd8af804a93e7868eb184490667726b59c68d4","head":{"label":"eli-jordan:representable-functor","ref":"representable-functor","sha":"f9dd8af804a93e7868eb184490667726b59c68d4","user":{"login":"eli-jordan","id":326125,"node_id":"MDQ6VXNlcjMyNjEyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/326125?v=4","gravatar_id":"","url":"https://api.github.com/users/eli-jordan","html_url":"https://github.com/eli-jordan","followers_url":"https://api.github.com/users/eli-jordan/followers","following_url":"https://api.github.com/users/eli-jordan/following{/other_user}","gists_url":"https://api.github.com/users/eli-jordan/gists{/gist_id}","starred_url":"https://api.github.com/users/eli-jordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eli-jordan/subscriptions","organizations_url":"https://api.github.com/users/eli-jordan/orgs","repos_url":"https://api.github.com/users/eli-jordan/repos","events_url":"https://api.github.com/users/eli-jordan/events{/privacy}","received_events_url":"https://api.github.com/users/eli-jordan/received_events","type":"User","site_admin":false},"repo":{"id":136130750,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYxMzA3NTA=","name":"cats","full_name":"eli-jordan/cats","owner":{"login":"eli-jordan","id":326125,"node_id":"MDQ6VXNlcjMyNjEyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/326125?v=4","gravatar_id":"","url":"https://api.github.com/users/eli-jordan","html_url":"https://github.com/eli-jordan","followers_url":"https://api.github.com/users/eli-jordan/followers","following_url":"https://api.github.com/users/eli-jordan/following{/other_user}","gists_url":"https://api.github.com/users/eli-jordan/gists{/gist_id}","starred_url":"https://api.github.com/users/eli-jordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eli-jordan/subscriptions","organizations_url":"https://api.github.com/users/eli-jordan/orgs","repos_url":"https://api.github.com/users/eli-jordan/repos","events_url":"https://api.github.com/users/eli-jordan/events{/privacy}","received_events_url":"https://api.github.com/users/eli-jordan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eli-jordan/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":true,"url":"https://api.github.com/repos/eli-jordan/cats","forks_url":"https://api.github.com/repos/eli-jordan/cats/forks","keys_url":"https://api.github.com/repos/eli-jordan/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eli-jordan/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eli-jordan/cats/teams","hooks_url":"https://api.github.com/repos/eli-jordan/cats/hooks","issue_events_url":"https://api.github.com/repos/eli-jordan/cats/issues/events{/number}","events_url":"https://api.github.com/repos/eli-jordan/cats/events","assignees_url":"https://api.github.com/repos/eli-jordan/cats/assignees{/user}","branches_url":"https://api.github.com/repos/eli-jordan/cats/branches{/branch}","tags_url":"https://api.github.com/repos/eli-jordan/cats/tags","blobs_url":"https://api.github.com/repos/eli-jordan/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eli-jordan/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eli-jordan/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/eli-jordan/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eli-jordan/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/eli-jordan/cats/languages","stargazers_url":"https://api.github.com/repos/eli-jordan/cats/stargazers","contributors_url":"https://api.github.com/repos/eli-jordan/cats/contributors","subscribers_url":"https://api.github.com/repos/eli-jordan/cats/subscribers","subscription_url":"https://api.github.com/repos/eli-jordan/cats/subscription","commits_url":"https://api.github.com/repos/eli-jordan/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/eli-jordan/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/eli-jordan/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/eli-jordan/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/eli-jordan/cats/contents/{+path}","compare_url":"https://api.github.com/repos/eli-jordan/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eli-jordan/cats/merges","archive_url":"https://api.github.com/repos/eli-jordan/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eli-jordan/cats/downloads","issues_url":"https://api.github.com/repos/eli-jordan/cats/issues{/number}","pulls_url":"https://api.github.com/repos/eli-jordan/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/eli-jordan/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/eli-jordan/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eli-jordan/cats/labels{/name}","releases_url":"https://api.github.com/repos/eli-jordan/cats/releases{/id}","deployments_url":"https://api.github.com/repos/eli-jordan/cats/deployments","created_at":"2018-06-05T06:29:41Z","updated_at":"2018-06-05T06:29:44Z","pushed_at":"2018-06-16T05:48:59Z","git_url":"git://github.com/eli-jordan/cats.git","ssh_url":"git@github.com:eli-jordan/cats.git","clone_url":"https://github.com/eli-jordan/cats.git","svn_url":"https://github.com/eli-jordan/cats","homepage":"http://typelevel.org/cats/","size":23500,"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":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"typelevel:master","ref":"master","sha":"daa646d8b0c3bec72805f6f6d3cc2f071e272064","user":{"login":"typelevel","id":3731824,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzE4MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3731824?v=4","gravatar_id":"","url":"https://api.github.com/users/typelevel","html_url":"https://github.com/typelevel","followers_url":"https://api.github.com/users/typelevel/followers","following_url":"https://api.github.com/users/typelevel/following{/other_user}","gists_url":"https://api.github.com/users/typelevel/gists{/gist_id}","starred_url":"https://api.github.com/users/typelevel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typelevel/subscriptions","organizations_url":"https://api.github.com/users/typelevel/orgs","repos_url":"https://api.github.com/users/typelevel/repos","events_url":"https://api.github.com/users/typelevel/events{/privacy}","received_events_url":"https://api.github.com/users/typelevel/received_events","type":"Organization","site_admin":false},"repo":{"id":29986727,"node_id":"MDEwOlJlcG9zaXRvcnkyOTk4NjcyNw==","name":"cats","full_name":"typelevel/cats","owner":{"login":"typelevel","id":3731824,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzE4MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3731824?v=4","gravatar_id":"","url":"https://api.github.com/users/typelevel","html_url":"https://github.com/typelevel","followers_url":"https://api.github.com/users/typelevel/followers","following_url":"https://api.github.com/users/typelevel/following{/other_user}","gists_url":"https://api.github.com/users/typelevel/gists{/gist_id}","starred_url":"https://api.github.com/users/typelevel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typelevel/subscriptions","organizations_url":"https://api.github.com/users/typelevel/orgs","repos_url":"https://api.github.com/users/typelevel/repos","events_url":"https://api.github.com/users/typelevel/events{/privacy}","received_events_url":"https://api.github.com/users/typelevel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typelevel/cats","description":"Lightweight, modular, and extensible library for functional programming.","fork":false,"url":"https://api.github.com/repos/typelevel/cats","forks_url":"https://api.github.com/repos/typelevel/cats/forks","keys_url":"https://api.github.com/repos/typelevel/cats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typelevel/cats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typelevel/cats/teams","hooks_url":"https://api.github.com/repos/typelevel/cats/hooks","issue_events_url":"https://api.github.com/repos/typelevel/cats/issues/events{/number}","events_url":"https://api.github.com/repos/typelevel/cats/events","assignees_url":"https://api.github.com/repos/typelevel/cats/assignees{/user}","branches_url":"https://api.github.com/repos/typelevel/cats/branches{/branch}","tags_url":"https://api.github.com/repos/typelevel/cats/tags","blobs_url":"https://api.github.com/repos/typelevel/cats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typelevel/cats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typelevel/cats/git/refs{/sha}","trees_url":"https://api.github.com/repos/typelevel/cats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typelevel/cats/statuses/{sha}","languages_url":"https://api.github.com/repos/typelevel/cats/languages","stargazers_url":"https://api.github.com/repos/typelevel/cats/stargazers","contributors_url":"https://api.github.com/repos/typelevel/cats/contributors","subscribers_url":"https://api.github.com/repos/typelevel/cats/subscribers","subscription_url":"https://api.github.com/repos/typelevel/cats/subscription","commits_url":"https://api.github.com/repos/typelevel/cats/commits{/sha}","git_commits_url":"https://api.github.com/repos/typelevel/cats/git/commits{/sha}","comments_url":"https://api.github.com/repos/typelevel/cats/comments{/number}","issue_comment_url":"https://api.github.com/repos/typelevel/cats/issues/comments{/number}","contents_url":"https://api.github.com/repos/typelevel/cats/contents/{+path}","compare_url":"https://api.github.com/repos/typelevel/cats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typelevel/cats/merges","archive_url":"https://api.github.com/repos/typelevel/cats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typelevel/cats/downloads","issues_url":"https://api.github.com/repos/typelevel/cats/issues{/number}","pulls_url":"https://api.github.com/repos/typelevel/cats/pulls{/number}","milestones_url":"https://api.github.com/repos/typelevel/cats/milestones{/number}","notifications_url":"https://api.github.com/repos/typelevel/cats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typelevel/cats/labels{/name}","releases_url":"https://api.github.com/repos/typelevel/cats/releases{/id}","deployments_url":"https://api.github.com/repos/typelevel/cats/deployments","created_at":"2015-01-28T20:26:48Z","updated_at":"2018-06-19T20:21:06Z","pushed_at":"2018-06-19T20:20:57Z","git_url":"git://github.com/typelevel/cats.git","ssh_url":"git@github.com:typelevel/cats.git","clone_url":"https://github.com/typelevel/cats.git","svn_url":"https://github.com/typelevel/cats","homepage":"http://typelevel.org/cats/","size":23484,"stargazers_count":2580,"watchers_count":2580,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":619,"mirror_url":null,"archived":false,"open_issues_count":233,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":619,"open_issues":233,"watchers":2580,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typelevel/cats/pulls/2284"},"html":{"href":"https://github.com/typelevel/cats/pull/2284"},"issue":{"href":"https://api.github.com/repos/typelevel/cats/issues/2284"},"comments":{"href":"https://api.github.com/repos/typelevel/cats/issues/2284/comments"},"review_comments":{"href":"https://api.github.com/repos/typelevel/cats/pulls/2284/comments"},"review_comment":{"href":"https://api.github.com/repos/typelevel/cats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/typelevel/cats/pulls/2284/commits"},"statuses":{"href":"https://api.github.com/repos/typelevel/cats/statuses/f9dd8af804a93e7868eb184490667726b59c68d4"}},"author_association":"NONE"}}
{"actor":{"display_login":"kailuowang"}}