summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/makro/Aliases.scala
blob: d7dd111f223b71f31a01eaf0d5eb8adf90bede6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package scala.reflect.makro

trait Aliases {
  self: Context =>

  /** Aliases of mirror types */
  type Symbol = mirror.Symbol
  type Type = mirror.Type
  type Name = mirror.Name
  type Tree = mirror.Tree
  // type Position = mirror.Position
  type Scope = mirror.Scope
  type Modifiers = mirror.Modifiers
  type Expr[+T] = mirror.Expr[T]
  type TypeTag[T] = mirror.TypeTag[T]
  type ConcreteTypeTag[T] = mirror.ConcreteTypeTag[T]

  /** Creator/extractor objects for Expr and TypeTag values */
  val TypeTag = mirror.TypeTag
  val ConcreteTypeTag = mirror.ConcreteTypeTag
  val Expr = mirror.Expr

  /** incantations for summoning tags */
  def tag[T](implicit ttag: TypeTag[T]) = ttag
  def typeTag[T](implicit ttag: TypeTag[T]) = ttag
  def concreteTag[T](implicit cttag: ConcreteTypeTag[T]) = cttag
  def concreteTypeTag[T](implicit cttag: ConcreteTypeTag[T]) = cttag
}