Skip to content

Commit 3f12942

Browse files
committed
Rename Quotable -> Liftable
1 parent 6c26763 commit 3f12942

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

library/src/scala/quoted/Expr.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class Expr[T] extends Quoted {
66
}
77

88
object Expr {
9-
implicit def toExpr[T](x: T)(implicit ev: Quotable[T]): Expr[T] =
9+
implicit def toExpr[T](x: T)(implicit ev: Liftable[T]): Expr[T] =
1010
ev.toExpr(x)
1111
}
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
package scala.quoted
2-
import scala.math
32

43
/** A typeclass for types that can be turned to `quoted.Expr[T]`
54
* without going through an explicit `'(...)` operation.
65
*/
7-
abstract class Quotable[T] {
6+
abstract class Liftable[T] {
87
implicit def toExpr(x: T): Expr[T]
98
}
109

11-
/** Some base quotable types. To be completed with at least all types
10+
/** Some liftable base types. To be completed with at least all types
1211
* that are valid Scala literals. The actual implementation of these
1312
* typed could be in terms of `ast.tpd.Literal`; the test `quotable.scala`
1413
* gives an alternative implementation using just the basic staging system.
1514
*/
16-
object Quotable {
17-
18-
implicit def IntIsQuotable: Quotable[Int] = ???
19-
implicit def BooleanIsQuotable: Quotable[Boolean] = ???
15+
object Liftable {
16+
implicit def IntIsLiftable: Liftable[Int] = ???
17+
implicit def BooleanIsLiftable: Liftable[Boolean] = ???
2018
}

tests/pos/quotable.scala renamed to tests/pos/liftable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Test {
1717
if (b) '(true) else '(false)
1818
}
1919

20-
implicit def ListIsQuotable[T: Type: Quotable]: Quotable[List[T]] = new {
20+
implicit def ListIsQuotable[T: Quotable]: Quotable[List[T]] = new {
2121
def toExpr(xs: List[T]): Expr[List[T]] = xs match {
2222
case x :: xs1 => '{ ~implicitly[Quotable[T]].toExpr(x) :: ~toExpr(xs1) }
2323
case Nil => '(Nil: List[T])

0 commit comments

Comments
 (0)