Skip to content

Commit

Permalink
Update references to quasiquotes guide
Browse files Browse the repository at this point in the history
  • Loading branch information
densh committed Apr 3, 2014
1 parent 470a512 commit 965bfc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/reflect/scala/reflect/api/Liftables.scala
Expand Up @@ -6,7 +6,7 @@ trait Liftables { self: Universe =>

/** A type class that defines a representation of `T` as a `Tree`.
*
* @see [[http://docs.scala-lang.org/overviews/macros/quasiquotes.html#lifting]]
* @see [[http://docs.scala-lang.org/overviews/quasiquotes/lifting.html]]
*/
trait Liftable[T] {
def apply(value: T): Tree
Expand All @@ -32,15 +32,15 @@ trait Liftables { self: Universe =>
* lifted: universe.Tree = O
* }}}
*
* @see [[http://docs.scala-lang.org/overviews/macros/quasiquotes.html#lifting]]
* @see [[http://docs.scala-lang.org/overviews/quasiquotes/lifting.html]]
*/
def apply[T](f: T => Tree): Liftable[T] =
new Liftable[T] { def apply(value: T): Tree = f(value) }
}

/** A type class that defines a way to extract instance of `T` from a `Tree`.
*
* @see [[http://docs.scala-lang.org/overviews/macros/quasiquotes.html#unlifting]]
* @see [[http://docs.scala-lang.org/overviews/quasiquotes/unlifting.html]]
*/
trait Unliftable[T] {
def unapply(tree: Tree): Option[T]
Expand All @@ -66,7 +66,7 @@ trait Liftables { self: Universe =>
* scala> val q"${_: O.type}" = q"$Oref"
* }}}
*
* @see [[http://docs.scala-lang.org/overviews/macros/quasiquotes.html#unlifting]]
* @see [[http://docs.scala-lang.org/overviews/quasiquotes/unlifting.html]]
*/
def apply[T](pf: PartialFunction[Tree, T]): Unliftable[T] = new Unliftable[T] {
def unapply(value: Tree): Option[T] = pf.lift(value)
Expand Down
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/api/Quasiquotes.scala
Expand Up @@ -7,7 +7,7 @@ trait Quasiquotes { self: Universe =>
* that are also known as quasiquotes. With their help you can easily manipulate
* Scala reflection ASTs.
*
* @see [[http://docs.scala-lang.org/overviews/macros/quasiquotes.html]]
* @see [[http://docs.scala-lang.org/overviews/quasiquotes/intro.html]]
*/
implicit class Quasiquote(ctx: StringContext) {
protected trait api {
Expand Down

0 comments on commit 965bfc6

Please sign in to comment.