{"action":"created","issue":{"url":"https://api.github.com/repos/non/cats/issues/580","labels_url":"https://api.github.com/repos/non/cats/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/non/cats/issues/580/comments","events_url":"https://api.github.com/repos/non/cats/issues/580/events","html_url":"https://github.com/non/cats/issues/580","id":112187207,"number":580,"title":"Inference issues with Id","user":{"login":"ceedubs","id":977929,"avatar_url":"https://avatars.githubusercontent.com/u/977929?v=3","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-19T16:52:33Z","updated_at":"2015-11-10T13:56:50Z","closed_at":null,"body":"I can fetch the `Applicative` instance for a `Kleisli` of a `List` no problem:\r\n\r\n```scala\r\nscala> import cats._, data._, implicits._\r\nimport cats._\r\nimport data._\r\nimport implicits._\r\n\r\nscala> Applicative[Kleisli[List, Int, ?]]\r\nres0: cats.Applicative[[γ]cats.data.Kleisli[[+A]List[A],Int,γ]] = cats.data.KleisliInstances$$anon$2@10c03632\r\n```\r\n\r\nHowever, if I use `Id` instead of `List`, I run into issues:\r\n\r\n```scala\r\nscala> Applicative[Kleisli[Id, Int, ?]]\r\n<console>:20: error: could not find implicit value for parameter instance: cats.Applicative[[γ]cats.data.Kleisli[[A]A,Int,γ]]\r\n       Applicative[Kleisli[Id, Int, ?]]\r\n                  ^\r\n```\r\n\r\nThis smells like a scala compiler bug, because it works if I call `kleisliApplicative` explicitly:\r\n\r\n```scala\r\nscala> val F: Applicative[Kleisli[Id, Int, ?]] = Kleisli.kleisliApplicative[Id, Int]\r\nF: cats.Applicative[[γ]cats.data.Kleisli[[A]A,Int,γ]] = cats.data.KleisliInstances1$$anon$4@12dd5884\r\n```\r\n\r\nQuestions:\r\n* Why exactly does this happen?\r\n* Does this have to do with the way we have Id defined? If so, can we change the way we define it to get around this?\r\n* If we can't work around this with the way we have Id defined, should we work around it by providing explicit instances related to Id in a bunch of places?"},"comment":{"url":"https://api.github.com/repos/non/cats/issues/comments/155425922","html_url":"https://github.com/non/cats/issues/580#issuecomment-155425922","issue_url":"https://api.github.com/repos/non/cats/issues/580","id":155425922,"user":{"login":"ceedubs","id":977929,"avatar_url":"https://avatars.githubusercontent.com/u/977929?v=3","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},"created_at":"2015-11-10T13:56:50Z","updated_at":"2015-11-10T13:56:50Z","body":"I'm working on this. For now I'm going to use the familiar prioritization via subtyping approach, but I think it'd be neat if export-hook took care of this in the future."}}