Last active
December 14, 2015 04:19
-
-
Save michaelpj/5027238 to your computer and use it in GitHub Desktop.
Weird implicts problem in Scala 2.10.1-RC1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz.Pointed | |
import scalaz.Scalaz._ | |
trait Doobie[A] | |
object Doobie { | |
implicit def doobiePointed = new Pointed[Doobie] { def point[A](a: => A) = new Doobie[A]() {}; def map[A, B](d: Doobie[A])(f: A => B) = ??? } | |
} | |
object Foo { | |
type Bar[A] = Doobie[A] | |
val foo = 3.point[Bar] // can't find instance of Pointed for Bar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked in 2.10.0!