Skip to content

Commit bf31454

Browse files
committed
wip
1 parent fdbfbf5 commit bf31454

34 files changed

+34
-37
lines changed

compiler/src/dotty/tools/dotc/quoted/Toolbox.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ import dotty.tools.dotc.ast.tpd
44

55
import scala.quoted.Expr
66
import scala.quoted.Exprs.{LiftedExpr, TastyTreeExpr}
7-
import scala.runtime.quoted._
87

98
/** Default runners for quoted expressions */
109
object Toolbox {
1110
import tpd._
1211

13-
implicit def make(implicit settings: ToolboxSettings): Toolbox = new Toolbox {
12+
implicit def make(implicit settings: ToolboxSettings): scala.quoted.Toolbox = new scala.quoted.Toolbox {
1413

1514
private[this] val driver: QuoteDriver = new QuoteDriver()
1615

library/src/scala/quoted/Expr.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package scala.quoted
22

3-
import scala.runtime.quoted.Toolbox
43
import scala.runtime.quoted.Unpickler.Pickled
54

65
sealed abstract class Expr[T] {

library/src/scala/runtime/quoted/Toolbox.scala renamed to library/src/scala/quoted/Toolbox.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package scala.runtime.quoted
1+
package scala.quoted
22

33
import scala.annotation.implicitNotFound
4-
import scala.quoted.Expr
54

65
@implicitNotFound("Could not find implicit quoted.Toolbox. Default toolbox can be imported with `import dotty.tools.dotc.quoted.Toolbox._`")
76
trait Toolbox {

tests/run-with-compiler/i3876-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._
22
import scala.quoted._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val x: Expr[Int] = '(3)
88

tests/run-with-compiler/i3876-c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._
22
import scala.quoted._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val x: Expr[Int] = '(3)
88

tests/run-with-compiler/i3876-d.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._
22
import scala.quoted._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val x: Expr[Int] = '(3)
88

tests/run-with-compiler/i3876.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._
22
import scala.quoted._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val x: Expr[Int] = '(3)
88

tests/run-with-compiler/i3946.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._
22
import scala.quoted._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val u: Expr[Unit] = '()
88
println(u.show)

tests/run-with-compiler/i3947.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947b2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947b3.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947d.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947d2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947e.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947f.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947g.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947i.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i3947j.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.quoted.Toolbox._
55
object Test {
66

77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def test[T](clazz: java.lang.Class[T]): Unit = {
1111
val lclazz = clazz.toExpr

tests/run-with-compiler/i4350.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Foo[T: Type] {
88

99
object Test {
1010
def main(args: Array[String]): Unit = {
11-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
11+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
1212
println((new Foo[Object]).q.show)
1313
println((new Foo[String]).q.show)
1414
}

tests/run-with-compiler/quote-lib.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import liftable.Exprs._
1111

1212
object Test {
1313
def main(args: Array[String]): Unit = {
14-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
14+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
1515

1616
val liftedUnit: Expr[Unit] = '()
1717

tests/run-with-compiler/quote-owners-2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import dotty.tools.dotc.quoted.Toolbox._
44

55
object Test {
66
def main(args: Array[String]): Unit = {
7-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
7+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
88

99
val q = f(g(Type.IntTag))
1010
println(q.run)

tests/run-with-compiler/quote-owners.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import dotty.tools.dotc.quoted.Toolbox._
33

44
object Test {
55
def main(args: Array[String]): Unit = {
6-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
6+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
77

88
val q = f
99
println(q.run)

tests/run-with-compiler/quote-run-2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.quoted._
55

66
object Test {
77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def powerCode(n: Int, x: Expr[Double]): Expr[Double] =
1111
if (n == 0) '(1.0)

tests/run-with-compiler/quote-run-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.quoted._
55

66
object Test {
77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
val lambdaExpr = '{
1111
(x: Int) => println("lambda(" + x + ")")

tests/run-with-compiler/quote-run-c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.quoted._
55

66
object Test {
77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
val classExpr = '{
1111
class A {

tests/run-with-compiler/quote-run-constants.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.quoted._
55

66
object Test {
77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
def run[T](expr: Expr[T]): Unit = println(expr.run)
1111
def show[T](expr: Expr[T]): Unit = println(expr.show)

tests/run-with-compiler/quote-run-many.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22

33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
def expr(i: Int) = '{
88
val a = 3 + ~i.toExpr

tests/run-with-compiler/quote-run-with-settings.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import scala.quoted._
88

99
object Test {
1010
def main(args: Array[String]): Unit = {
11-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
11+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
1212
val expr = '{
1313
val a = 3
1414
println("foo")
@@ -25,7 +25,7 @@ object Test {
2525

2626
{
2727
implicit val settings = ToolboxSettings.make(optimise = true, outDir = Some(outDir.toString))
28-
implicit val toolbox2: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
28+
implicit val toolbox2: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
2929
println(expr.run)
3030
assert(Files.exists(classFile))
3131
}

tests/run-with-compiler/quote-run.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.quoted._
55

66
object Test {
77
def main(args: Array[String]): Unit = {
8-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
8+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
99

1010
val expr = '{
1111
val a = 3

tests/run-with-compiler/quote-show-blocks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22

33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
def a(n: Int, x: Expr[Unit]): Expr[Unit] =
88
if (n == 0) x

tests/run-with-compiler/quote-two-captured-ref.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import quoted._
22

33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
val q = '{
88
val x = 1

tests/run-with-compiler/quote-type-tags.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22

33
object Test {
44
def main(args: Array[String]): Unit = {
5-
implicit val toolbox: scala.runtime.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
5+
implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make
66

77
def asof[T, U](x: Expr[T], t: Type[U]): Expr[U] =
88
'((~x).asInstanceOf[~t])

0 commit comments

Comments
 (0)