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 `-Ypartial-unification` fails #10310

Closed
m50d opened this Issue May 11, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@m50d

m50d commented May 11, 2017

Simplified/standalone version of the first failure case I'm hitting from tierney. testSuccess compiles (by passing explicit type parameters), testFail does not (even with -Ypartial-unification) whereas I would (maybe) expect it to?

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)
}
@m50d

This comment has been minimized.

Show comment
Hide comment
@m50d

m50d Dec 24, 2017

Think this was a mistake in how I was passing the parameter. Sorry for the trouble.

m50d commented Dec 24, 2017

Think this was a mistake in how I was passing the parameter. Sorry for the trouble.

@m50d m50d closed this Dec 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment