Skip to content

Commit 1d6554a

Browse files
committed
Fix docs
1 parent af57c99 commit 1d6554a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/principled-meta-programming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ usage. But the code can be made phase correct by adding a binding
169169
of a `Type[T]` tag:
170170

171171
def reflect[T, U](f: Expr[T] => Expr[U])(implicit t: Type[T]): Expr[T => U] =
172-
’{ (x: ~t) => ~f(’(x))
172+
’{ (x: ~t) => ~f(’(x)) }
173173

174174
In this version of `reflect`, the type of `x` is now the result of
175175
splicing the `Type` value `t`. This operation _is_ splice correct -- there
176176
is one quote and one splice between the use of `t` and its definition.
177177

178178
To avoid clutter, the Scala implementation tries to convert any phase-incorrect
179179
reference to a type `T` to a type-splice, by rewriting `T` to `~implicitly[Type[T]]`.
180-
For instance, the user-level definition of `reflect`
180+
For instance, the user-level definition of `reflect`:
181181

182182
def reflect[T: Type, U](f: Expr[T] => Expr[U]) Expr[T => U] =
183183
’{ (x: T) => ~f(’(x)) }

0 commit comments

Comments
 (0)