Skip to content

Instantly share code, notes, and snippets.

@michaelpj
Last active December 14, 2015 04:19
Show Gist options
  • Save michaelpj/5027238 to your computer and use it in GitHub Desktop.
Save michaelpj/5027238 to your computer and use it in GitHub Desktop.
Weird implicts problem in Scala 2.10.1-RC1.
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
}
@michaelpj
Copy link
Author

This worked in 2.10.0!

@jedws
Copy link

jedws commented Feb 25, 2013

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