@@ -182,7 +182,7 @@ splicing the `Type` value `t`. This operation _is_ splice correct -- there
182182is one quote and one splice between the use of ` t ` and its definition.
183183
184184To avoid clutter, the Scala implementation tries to convert any phase-incorrect
185- reference to a type ` T ` to a type-splice, by rewriting ` T ` to ` ${ the [Type[T]] } ` .
185+ reference to a type ` T ` to a type-splice, by rewriting ` T ` to ` ${ summon [Type[T]] } ` .
186186For instance, the user-level definition of ` reflect ` :
187187
188188``` scala
@@ -192,7 +192,7 @@ For instance, the user-level definition of `reflect`:
192192would be rewritten to
193193``` scala
194194 def reflect [T : Type , U : Type ](f : Expr [T ] => Expr [U ]): Expr [T => U ] =
195- ' { (x : $ { the [Type [T ]] }) => $ { f(' x ) } }
195+ ' { (x : $ { summon [Type [T ]] }) => $ { f(' x ) } }
196196```
197197The ` the ` query succeeds because there is a given instance of
198198type ` Type[T] ` available (namely the given parameter corresponding
@@ -252,7 +252,7 @@ The `toExpr` extension method is defined in package `quoted`:
252252 package quoted
253253
254254 given ExprOps {
255- def (x : T ) toExpr[T : Liftable ] given QuoteContext : Expr [T ] = the [Liftable [T ]].toExpr(x)
255+ def (x : T ) toExpr[T : Liftable ] given QuoteContext : Expr [T ] = summon [Liftable [T ]].toExpr(x)
256256 ...
257257 }
258258```
@@ -334,12 +334,12 @@ that are not defined in the current stage? Here, we cannot construct
334334the ` Type[T] ` tree directly, so we need to get it from a recursive
335335implicit search. For instance, to implement
336336``` scala
337- the [Type [List [T ]]]
337+ summon [Type [List [T ]]]
338338```
339339where ` T ` is not defined in the current stage, we construct the type constructor
340340of ` List ` applied to the splice of the result of searching for a given instance for ` Type[T] ` :
341341``` scala
342- ' [ List [ $ { the [Type [T ]] } ] ]
342+ ' [ List [ $ { summon [Type [T ]] } ] ]
343343```
344344This is exactly the algorithm that Scala 2 uses to search for type tags.
345345In fact Scala 2's type tag feature can be understood as a more ad-hoc version of
0 commit comments