In Scala 2.9 trunk, you can do this:
scala> class A defined class A scala> def f(implicit a: A) = 0 f: (implicit a: A)Int scala> scala> class Vendor[T](val v: T) defined class Vendor scala> implicit def value[T: Vendor] = implicitly[Vendor[T]].v value: [T](implicit evidence$1: Vendor[T])T scala> implicit val vendor = new Vendor(new A) vendor: Vendor[A] = Vendor@bbb2d0 scala> f res0: Int = 0
A call to f will search for a value of type A and find the implicit value[A] , which requires a proof parameter of type Vendor[A] . It enables this vendor proof parameter.
I do not think that the implications were so powerful in 2.8.1.
source share