Abstract Value Members
-
abstract
val
value: T
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
def
flatMap[U](f: (T) ⇒ Lazy[U]): Lazy[U]
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[U](f: (T) ⇒ U): Lazy[U]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Wraps a lazily computed value. Also circumvents cycles during implicit search, or wrong implicit divergences as illustrated below, and holds the corresponding implicit value lazily.
The following implicit search sometimes fails to compile, because of a wrongly reported implicit divergence,
This wrongly reported implicit divergence can be circumvented by wrapping some of the implicit values in
Lazy
,When looking for an implicit
Lazy[TC[T]]
, theLazy.mkLazy
macro will itself trigger the implicit search for aTC[T]
. If this search itself triggers searches for types wrapped inLazy
, these will be done only once, their result put in alazy val
, and a reference to thislazy val
will be returned as the corresponding value. It will then wrap all the resulting values together, and return a reference to the first one.E.g. with the above example definitions, when looking up for an implicit
TC[ListCC]
, the returned tree roughly looks like