{"action":"created","issue":{"url":"https://api.github.com/repos/scala/scala/issues/5102","repository_url":"https://api.github.com/repos/scala/scala","labels_url":"https://api.github.com/repos/scala/scala/issues/5102/labels{/name}","comments_url":"https://api.github.com/repos/scala/scala/issues/5102/comments","events_url":"https://api.github.com/repos/scala/scala/issues/5102/events","html_url":"https://github.com/scala/scala/pull/5102","id":148714638,"number":5102,"title":"Add support for higher order unification. Fixes SI-2712.","user":{"login":"milessabin","id":131183,"avatar_url":"https://avatars.githubusercontent.com/u/131183?v=3","gravatar_id":"","url":"https://api.github.com/users/milessabin","html_url":"https://github.com/milessabin","followers_url":"https://api.github.com/users/milessabin/followers","following_url":"https://api.github.com/users/milessabin/following{/other_user}","gists_url":"https://api.github.com/users/milessabin/gists{/gist_id}","starred_url":"https://api.github.com/users/milessabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milessabin/subscriptions","organizations_url":"https://api.github.com/users/milessabin/orgs","repos_url":"https://api.github.com/users/milessabin/repos","events_url":"https://api.github.com/users/milessabin/events{/privacy}","received_events_url":"https://api.github.com/users/milessabin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"retronym","id":65551,"avatar_url":"https://avatars.githubusercontent.com/u/65551?v=3","gravatar_id":"","url":"https://api.github.com/users/retronym","html_url":"https://github.com/retronym","followers_url":"https://api.github.com/users/retronym/followers","following_url":"https://api.github.com/users/retronym/following{/other_user}","gists_url":"https://api.github.com/users/retronym/gists{/gist_id}","starred_url":"https://api.github.com/users/retronym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retronym/subscriptions","organizations_url":"https://api.github.com/users/retronym/orgs","repos_url":"https://api.github.com/users/retronym/repos","events_url":"https://api.github.com/users/retronym/events{/privacy}","received_events_url":"https://api.github.com/users/retronym/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/52","html_url":"https://github.com/scala/scala/milestones/2.12.0-M5","labels_url":"https://api.github.com/repos/scala/scala/milestones/52/labels","id":1355301,"number":52,"title":"2.12.0-M5","description":"Merge to 2.12.x. \r\n\r\nLead: @lrytz\r\n\r\nIn order to meet our deadline, we will only accept new PRs that fix an issue scheduled for M5 over at https://github.com/scala/scala-dev/milestones/2.12.0-M5 (no longer accepting new issues as of May 2). \r\n\r\nNOTE: We always accept more tests/docs -- this restriction aims to avoid PRs that change functionality or may otherwise cause regressions and release date slips.\r\n\r\nLukas informed scala-internals about this on April 22nd. For urgent/critical issues, exceptions will be considered after discussion on scala-internals.\r\n\r\nThe deadline currently stands at June 3rd (originally it was one week earlier). We're working hard to beat this date, and will cut the release as soon as we've made our way through the PR queue.","creator":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=3","gravatar_id":"","url":"https://api.github.com/users/adriaanm","html_url":"https://github.com/adriaanm","followers_url":"https://api.github.com/users/adriaanm/followers","following_url":"https://api.github.com/users/adriaanm/following{/other_user}","gists_url":"https://api.github.com/users/adriaanm/gists{/gist_id}","starred_url":"https://api.github.com/users/adriaanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriaanm/subscriptions","organizations_url":"https://api.github.com/users/adriaanm/orgs","repos_url":"https://api.github.com/users/adriaanm/repos","events_url":"https://api.github.com/users/adriaanm/events{/privacy}","received_events_url":"https://api.github.com/users/adriaanm/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":44,"state":"open","created_at":"2015-10-14T13:06:29Z","updated_at":"2016-05-06T10:46:13Z","due_on":"2016-06-03T07:00:00Z","closed_at":null},"comments":84,"created_at":"2016-04-15T17:02:16Z","updated_at":"2016-05-06T13:21:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/5102","html_url":"https://github.com/scala/scala/pull/5102","diff_url":"https://github.com/scala/scala/pull/5102.diff","patch_url":"https://github.com/scala/scala/pull/5102.patch"},"body":"Change is hidden behind `-Yhigher-order-unification` ... default is off. Compiler and standard library bootstraps with the flag both off and on.\r\n\r\nSimple algorithm as suggested by Paul Chiusano in the comments on [SI-2712](https://issues.scala-lang.org/browse/SI-2712?focusedCommentId=61270). Treat the type constructor as curried and partially applied, we treat a prefix as constants and solve for the suffix. For the example in the ticket, unifying M[A] with Int => Int this unifies as,\r\n```scala\r\nM[t] = [t][Int => t]\r\nA = Int\r\n```                                                                                \r\nThis appears to work well for Cats, Scalaz etc."},"comment":{"url":"https://api.github.com/repos/scala/scala/issues/comments/217437576","html_url":"https://github.com/scala/scala/pull/5102#issuecomment-217437576","issue_url":"https://api.github.com/repos/scala/scala/issues/5102","id":217437576,"user":{"login":"djspiewak","id":752,"avatar_url":"https://avatars.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},"created_at":"2016-05-06T13:21:17Z","updated_at":"2016-05-06T13:21:17Z","body":"@m50d Indeed, it does need to be done in Scalaz/Cats.  Given that it's a backwards-compatible change, these projects should probably make releases with the change *now* in preparation for the SI-2712 fix.  Well, actually validate first that the change does in fact resolve the ambiguity which Miles's fix introduces, and then make releases; don't just assume that my personal in-brain version of scalac is accurate!  :-)"}}