A helper method that simplifies creation of Unliftable
instances. Takes a partial function which is defined on correct representations of T
and returns corresponding instances.
For example to extract a reference to an object as object itself:
scala> object O scala> val Oref = symbolOf[O.type].asClass.module scala> implicit val unliftO = Unliftable[O.type] { case t if t.symbol == Oref => O } scala> val q"${_: O.type}" = q"$Oref"
© 2002-2019 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://www.scala-lang.org/api/2.13.0/scala-reflect/scala/reflect/api/Liftables$Unliftable$.html
Companion to
Unliftable
type class that contains standard instances and provides a helperapply
method to simplify creation of new ones.