Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case where unification fails #10

Open
m50d opened this issue May 8, 2017 · 1 comment
Open

Case where unification fails #10

m50d opened this issue May 8, 2017 · 1 comment

Comments

@m50d
Copy link

m50d commented May 8, 2017

Simplified/standalone version of the first failure case I'm hitting from tierney. I have no idea whether this case is even possible to fix, but figured it was worth raising. testSuccess compiles (by passing explicit type parameters), testFail does not.

object Demo {
  trait Free1[F[_], A]
  trait Free2[F[_], A]
  trait Cp[F[_], G[_], A]

  class Fix[W[_[_[_], _], _[_], _], F[_], A]()
  type Unfixed[S[_[_], _], F[_], A] = 
    Cp[F, Free1[Free2[S[F, ?], ?], ?], A]
  
  trait Command[A]
  
  def unify[F[_], A](value: F[A]): Unit = {}
  
  def testSuccess(v: Free2[Fix[Unfixed, Command, ?], String]) =
    unify[Free2[Fix[Unfixed, Command, ?], ?], String](v)
    
  def testFail(v: Free2[Fix[Unfixed, Command, ?], String]) =
    unify(v)
}
@milessabin
Copy link
Owner

milessabin commented May 8, 2017

The SI-2712 fix has been merged in both Scala 2.11.x and 2.12.x now, so the Scala issue tracker is now the right place to report problems like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants