Home

Awesome

TypeOf.scala

Create types from expressions.

Note this library has been merged into Shapeless

type TypeOfToString = TypeOf.`math.random.toString`.type
val typeOfToString: TypeOf.`math.random.toString`.type = "another string"
def ops: TypeOf.`Ordering[Int].on { s: String => s.toInt }`.Ops = {
  val ordering = Ordering[Int].on { s: String => s.toInt }
  new ordering.Ops("xx")
}