{"action":"created","issue":{"url":"https://api.github.com/repos/mpilquist/simulacrum/issues/22","labels_url":"https://api.github.com/repos/mpilquist/simulacrum/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/mpilquist/simulacrum/issues/22/comments","events_url":"https://api.github.com/repos/mpilquist/simulacrum/issues/22/events","html_url":"https://github.com/mpilquist/simulacrum/issues/22","id":58498729,"number":22,"title":"Odd handling of unary operators","user":{"login":"nrinaudo","id":836994,"avatar_url":"https://avatars.githubusercontent.com/u/836994?v=3","gravatar_id":"","url":"https://api.github.com/users/nrinaudo","html_url":"https://github.com/nrinaudo","followers_url":"https://api.github.com/users/nrinaudo/followers","following_url":"https://api.github.com/users/nrinaudo/following{/other_user}","gists_url":"https://api.github.com/users/nrinaudo/gists{/gist_id}","starred_url":"https://api.github.com/users/nrinaudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrinaudo/subscriptions","organizations_url":"https://api.github.com/users/nrinaudo/orgs","repos_url":"https://api.github.com/users/nrinaudo/repos","events_url":"https://api.github.com/users/nrinaudo/events{/privacy}","received_events_url":"https://api.github.com/users/nrinaudo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-22T10:58:59Z","updated_at":"2015-02-23T14:26:57Z","closed_at":"2015-02-23T14:26:57Z","body":"I must point out that while *I* don't understand this, it might be the desired behaviour and I'm alone in finding it confusing.\r\n\r\nWhen generating the `Ops` trait of a given typeclass, if one of the operators has an arity of one, it expects a `=:=` implicit parameter.\r\n\r\nA good example is the `FlatMap` typeclass and its `flatten` method (as can be seen, among other projects, in your own [Structures](https://github.com/mpilquist/Structures)). Using the `-Ymacro-debug-lite` compiler flag yields the following code:\r\n\r\n    def flatten[A, B](implicit fresh$macro$14: $eq$colon$eq[fresh$macro$13, F[A]]) = \r\n      typeClassInstance.flatten(self.asInstanceOf[F[F[A]]])\r\n\r\nI'd naively assume that you could replace the method's body by `typeClassInstance.flatten(self)` and get rid of the `=:=` requirement, but haven't checked for myself."},"comment":{"url":"https://api.github.com/repos/mpilquist/simulacrum/issues/comments/75549176","html_url":"https://github.com/mpilquist/simulacrum/issues/22#issuecomment-75549176","issue_url":"https://api.github.com/repos/mpilquist/simulacrum/issues/22","id":75549176,"user":{"login":"mpilquist","id":118078,"avatar_url":"https://avatars.githubusercontent.com/u/118078?v=3","gravatar_id":"","url":"https://api.github.com/users/mpilquist","html_url":"https://github.com/mpilquist","followers_url":"https://api.github.com/users/mpilquist/followers","following_url":"https://api.github.com/users/mpilquist/following{/other_user}","gists_url":"https://api.github.com/users/mpilquist/gists{/gist_id}","starred_url":"https://api.github.com/users/mpilquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpilquist/subscriptions","organizations_url":"https://api.github.com/users/mpilquist/orgs","repos_url":"https://api.github.com/users/mpilquist/repos","events_url":"https://api.github.com/users/mpilquist/events{/privacy}","received_events_url":"https://api.github.com/users/mpilquist/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T14:26:57Z","updated_at":"2015-02-23T14:26:57Z","body":"No problem! I'll close this out but feel free to do so in the future -- either way works for me."}}