@@ -8,24 +8,10 @@ abstract class Quoted
8
8
9
9
object Quoted {
10
10
11
- /** A quote backed by a pickled TASTY tree */
12
- trait TastyQuoted extends Quoted {
13
- def tasty : Pickled
14
- def args : Seq [Any ]
15
- }
16
-
17
- /** Quoted for which its internal representation is its tree.
18
- * - Used for trees that cannot be serialized, such as references to local symbols that will be spliced in.
19
- * - Used for trees that do not need to be serialized to avoid the overhead of serialization/deserialization.
20
- */
21
- trait RawQuoted [Tree ] extends quoted.Quoted {
22
- def tree : Tree
23
- }
24
-
25
11
// Implementations of Expr[T]
26
12
27
13
/** An Expr backed by a pickled TASTY tree */
28
- final class TastyExpr [T ](val tasty : Pickled , val args : Seq [Any ]) extends Expr [T ] with TastyQuoted {
14
+ final class TastyExpr [T ](val tasty : Pickled , val args : Seq [Any ]) extends Expr [T ] {
29
15
override def toString (): String = s " Expr(<pickled>) "
30
16
}
31
17
@@ -35,7 +21,9 @@ object Quoted {
35
21
}
36
22
37
23
/** An Expr backed by a tree */
38
- final class RawExpr [Tree ](val tree : Tree ) extends quoted.Expr [Any ] with RawQuoted [Tree ]
24
+ final class RawExpr [Tree ](val tree : Tree ) extends quoted.Expr [Any ] {
25
+ override def toString : String = s " Expr(<raw>) "
26
+ }
39
27
40
28
/** An Expr representing `'{(~f).apply(~x)}` but it is beta-reduced when the closure is known */
41
29
final class FunctionAppliedTo [T , U ](val f : Expr [T => U ], val x : Expr [T ]) extends Expr [U ] {
@@ -45,7 +33,7 @@ object Quoted {
45
33
// Implementations of Type[T]
46
34
47
35
/** A Type backed by a pickled TASTY tree */
48
- final class TastyType [T ](val tasty : Pickled , val args : Seq [Any ]) extends Type [T ] with TastyQuoted {
36
+ final class TastyType [T ](val tasty : Pickled , val args : Seq [Any ]) extends Type [T ] {
49
37
override def toString (): String = s " Type(<pickled>) "
50
38
}
51
39
@@ -55,6 +43,8 @@ object Quoted {
55
43
}
56
44
57
45
/** An Type backed by a tree */
58
- final class RawType [Tree ](val tree : Tree ) extends quoted.Type [Any ] with RawQuoted [Tree ]
46
+ final class RawType [Tree ](val tree : Tree ) extends quoted.Type [Any ] {
47
+ override def toString : String = s " Type(<raw>) "
48
+ }
59
49
60
50
}
0 commit comments