> allowing a Function0[T] formal parameter to take an => T actual parameter
On second thought, it sounds like you want the reverse of what I just posted, but I can't quite get it to work the way I want:
scala> implicit def byNameToF0[A](a: => A): Function0[A] = () => a
byNameToF0: [A](a: => A)() => A
scala> def baz(x: Function0[String]) = "x ++ x is " + x() + x()
baz: (x: () => String)java.lang.String
scala> baz({ println("raz()") ; "raz" })
raz()
res0: java.lang.String = x ++ x is razraz
scala> baz(byNameToF0{ println("raz()") ; "raz" })
raz()
raz()
res1: java.lang.String = x ++ x is razraz
If I call the conversion directly, the full block is treated as the
by-name, but it doesn't work if I let the implicit conversion handle it.