{"action":"created","issue":{"url":"https://api.github.com/repos/non/cats/issues/821","labels_url":"https://api.github.com/repos/non/cats/issues/821/labels{/name}","comments_url":"https://api.github.com/repos/non/cats/issues/821/comments","events_url":"https://api.github.com/repos/non/cats/issues/821/events","html_url":"https://github.com/non/cats/pull/821","id":127763514,"number":821,"title":"Topic/apply ap reverse","user":{"login":"lukewyman","id":6766511,"avatar_url":"https://avatars.githubusercontent.com/u/6766511?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewyman","html_url":"https://github.com/lukewyman","followers_url":"https://api.github.com/users/lukewyman/followers","following_url":"https://api.github.com/users/lukewyman/following{/other_user}","gists_url":"https://api.github.com/users/lukewyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewyman/subscriptions","organizations_url":"https://api.github.com/users/lukewyman/orgs","repos_url":"https://api.github.com/users/lukewyman/repos","events_url":"https://api.github.com/users/lukewyman/events{/privacy}","received_events_url":"https://api.github.com/users/lukewyman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-20T19:21:27Z","updated_at":"2016-01-26T13:11:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/non/cats/pulls/821","html_url":"https://github.com/non/cats/pull/821","diff_url":"https://github.com/non/cats/pull/821.diff","patch_url":"https://github.com/non/cats/pull/821.patch"},"body":"This PR will not pass validation, because the laws won't pass. I still submitted it so that others can look at the changes and see what the issue is. I changed the signature of Apply.ap to reverse the order of the parameter lists from:\r\n```\r\ndef ap[A, B](fa: F[A])(ff: F[A => B]): F[B]\r\n```\r\nto\r\n```\r\ndef ap[A, B](ff: F[A => B])(fa: F[A]): F[B]\r\n```\r\nwhich broke a whole bunch of laws. So I switched the laws around, for example, from:\r\n```\r\ndef alternativeRightAbsorption[A, B](ff: F[A => B]): IsEq[F[B]] =\r\n    (F.empty[A] ap ff) <-> F.empty[B]\r\n```\r\nto\r\n```\r\ndef alternativeRightAbsorption[A, B](ff: F[A => B]): IsEq[F[B]] =\r\n    (ff ap F.empty[A]) <-> F.empty[B]\r\n```\r\nand the the law still errors with a message of:\r\n```\r\ncats/laws/AlternativeLaws.scala:11: Cannot prove that A => B =:= A => B.\r\n[error]     (ff ap F.empty[A]) <-> F.empty[B]\r\n```\r\nIt seems that A => B =:= A => B should be a provable thing. Is there anywhere else that test data \"feeds\" the laws that I also need to switch around to compensate for my switching around the parameter lists of Apply.ap?"},"comment":{"url":"https://api.github.com/repos/non/cats/issues/comments/175004443","html_url":"https://github.com/non/cats/pull/821#issuecomment-175004443","issue_url":"https://api.github.com/repos/non/cats/issues/821","id":175004443,"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":"2016-01-26T13:11:04Z","updated_at":"2016-01-26T13:11:04Z","body":"@lukewyman thanks a lot for all the work you've done on this. Sorry that I've been unresponsive - I've been traveling.\r\n\r\nI didn't think about how changing the order of the arguments would play with Simulacrum. This does seem a bit unfortunate. Separately, I'm not sure why the compiler wouldn't be able to prove `A => B =:= A => B`.\r\n\r\nPerhaps having the arguments line up with the order of effects isn't worth the hassle. But it also seems unfortunate if we arrive at this decision because of some syntax. @mpilquist do you have any thoughts on this?"}}