The implementation is based on a simple algorithm as suggested by Paul Chiusano in the comments on SI-2712:
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
Int => Int, this unifies as,
M[t] = [t][Int => t] A = Int
One place to discuss this fix is at typelevel's gitter room.
NOTE: This plugin should only be used by users still on Scala 2.10.x.
For Scala 2.11.x and 2.12.x users, the fix is available under the
-Ypartial-unification compiler flag.
scalacOptions += "-Ypartial-unification"
Scala 2.10.7 users can add the plugin by adding the following to their SBT build (no compiler flag needed):
addCompilerPlugin("com.milessabin" % "si2712fix-plugin_2.10.7" % "1.2.0") // or libraryDependencies += compilerPlugin("com.milessabin" % "si2712fix-plugin_2.10.7" % "1.2.0")
An example project can be found at milessabin/si2712fix-demo
Projects that use this plugin
Building the plugin
This plugin is built with SBT 0.13.11 or later, and its master branch is built with Scala 2.11.8 and 2.10.7 by default.