{"action":"created","issue":{"url":"https://api.github.com/repos/typelevel/cats/issues/1661","repository_url":"https://api.github.com/repos/typelevel/cats","labels_url":"https://api.github.com/repos/typelevel/cats/issues/1661/labels{/name}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/1661/comments","events_url":"https://api.github.com/repos/typelevel/cats/issues/1661/events","html_url":"https://github.com/typelevel/cats/issues/1661","id":228084247,"number":1661,"title":"Group[Eval[A]] is not lawful","user":{"login":"djspiewak","id":752,"avatar_url":"https://avatars2.githubusercontent.com/u/752?v=3","gravatar_id":"","url":"https://api.github.com/users/djspiewak","html_url":"https://github.com/djspiewak","followers_url":"https://api.github.com/users/djspiewak/followers","following_url":"https://api.github.com/users/djspiewak/following{/other_user}","gists_url":"https://api.github.com/users/djspiewak/gists{/gist_id}","starred_url":"https://api.github.com/users/djspiewak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djspiewak/subscriptions","organizations_url":"https://api.github.com/users/djspiewak/orgs","repos_url":"https://api.github.com/users/djspiewak/repos","events_url":"https://api.github.com/users/djspiewak/events{/privacy}","received_events_url":"https://api.github.com/users/djspiewak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-11T18:40:45Z","updated_at":"2017-05-11T21:52:35Z","closed_at":null,"body":"Specifically, the inverse laws do not hold, for the same reason that they would not hold for `Group[IO[A]]`.  The problem is that `Eval` can (now) encode failure, meaning that it has values which cannot be eliminated.  Simple counter-example:\r\n\r\n```scala\r\nval zero = Group[Eval[Int]].empty\r\nval example = Eval.raise(new Exception)\r\n\r\nexample.inverse |+| example === zero   // nope!\r\n```\r\n\r\nIn the above, `example.inverse |+| example` will be equal to `Eval.raise(new Exception)`, which is clearly incorrect.\r\n\r\nBasically, `Group` and `ApplicativeError` are mutually exclusive.  You can't have both of them at once.  If you want `Eval` to implement `MonadError`, then it can be at most a `Monoid`, but not a `Group`."},"comment":{"url":"https://api.github.com/repos/typelevel/cats/issues/comments/300927309","html_url":"https://github.com/typelevel/cats/issues/1661#issuecomment-300927309","issue_url":"https://api.github.com/repos/typelevel/cats/issues/1661","id":300927309,"user":{"login":"edmundnoble","id":1369693,"avatar_url":"https://avatars0.githubusercontent.com/u/1369693?v=3","gravatar_id":"","url":"https://api.github.com/users/edmundnoble","html_url":"https://github.com/edmundnoble","followers_url":"https://api.github.com/users/edmundnoble/followers","following_url":"https://api.github.com/users/edmundnoble/following{/other_user}","gists_url":"https://api.github.com/users/edmundnoble/gists{/gist_id}","starred_url":"https://api.github.com/users/edmundnoble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmundnoble/subscriptions","organizations_url":"https://api.github.com/users/edmundnoble/orgs","repos_url":"https://api.github.com/users/edmundnoble/repos","events_url":"https://api.github.com/users/edmundnoble/events{/privacy}","received_events_url":"https://api.github.com/users/edmundnoble/received_events","type":"User","site_admin":false},"created_at":"2017-05-11T21:52:35Z","updated_at":"2017-05-11T21:52:35Z","body":"For the record I'm also in favor of removing the error capturing behavior, especially seeing how it would interact with the stack-usage optimization I have; sacrificing individual stack frames becomes sacrificing `n` stack frames. The idea that an `Eval` I'm holding might carry an `Exception` makes it much harder from a library perspective to use it. \r\n\r\n@djspiewak `CommutativeMonoid[Eval[A]]` also fails, because for two error-containing `Eval`s adding one to the other always retains the *first* exception."}}
{"actor":{"display_login":"edmundnoble"}}