@@ -4,32 +4,28 @@ package quoted {
44 import scala .internal .quoted .TaggedType
55 import scala .quoted .show .SyntaxHighlight
66
7- sealed abstract class Type [T <: AnyKind ] {
7+ sealed trait Type [T <: AnyKind ] {
88 type `$splice` = T
9- }
10-
11- /** Some basic type tags, currently incomplete */
12- object Type {
13-
14- implicit class TypeOps [T ](tpe : Type [T ]) {
159
16- /** Show a source code like representation of this type without syntax highlight */
17- def show (implicit qctx : QuoteContext ): String = qctx.show(tpe , SyntaxHighlight .plain)
10+ /** Show a source code like representation of this type without syntax highlight */
11+ def show (implicit qctx : QuoteContext ): String = qctx.show(this , SyntaxHighlight .plain)
1812
19- /** Show a source code like representation of this type */
20- def show (syntaxHighlight : SyntaxHighlight )(implicit qctx : QuoteContext ): String = qctx.show(tpe , syntaxHighlight)
13+ /** Show a source code like representation of this type */
14+ def show (syntaxHighlight : SyntaxHighlight )(implicit qctx : QuoteContext ): String = qctx.show(this , syntaxHighlight)
2115
22- }
16+ }
2317
24- implicit val UnitTag : Type [Unit ] = new TaggedType [Unit ]
25- implicit val BooleanTag : Type [Boolean ] = new TaggedType [Boolean ]
26- implicit val ByteTag : Type [Byte ] = new TaggedType [Byte ]
27- implicit val CharTag : Type [Char ] = new TaggedType [Char ]
28- implicit val ShortTag : Type [Short ] = new TaggedType [Short ]
29- implicit val IntTag : Type [Int ] = new TaggedType [Int ]
30- implicit val LongTag : Type [Long ] = new TaggedType [Long ]
31- implicit val FloatTag : Type [Float ] = new TaggedType [Float ]
32- implicit val DoubleTag : Type [Double ] = new TaggedType [Double ]
18+ /** Some basic type tags, currently incomplete */
19+ object Type {
20+ delegate UnitTag for Type [Unit ] = new TaggedType [Unit ]
21+ delegate BooleanTag for Type [Boolean ] = new TaggedType [Boolean ]
22+ delegate ByteTag for Type [Byte ] = new TaggedType [Byte ]
23+ delegate CharTag for Type [Char ] = new TaggedType [Char ]
24+ delegate ShortTag for Type [Short ] = new TaggedType [Short ]
25+ delegate IntTag for Type [Int ] = new TaggedType [Int ]
26+ delegate LongTag for Type [Long ] = new TaggedType [Long ]
27+ delegate FloatTag for Type [Float ] = new TaggedType [Float ]
28+ delegate DoubleTag for Type [Double ] = new TaggedType [Double ]
3329 }
3430
3531}
0 commit comments