AbsTypeTag -> WeakTypeTag and converted more settings

This commit is contained in:
Mark Harrah 2012-09-21 16:42:07 -04:00
parent f536e6d9ac
commit c2760ecbdd
2 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ final class ContextUtil[C <: Context](val ctx: C)
def getPos(sym: Symbol) = if(sym eq null) NoPosition else sym.pos
def atypeOf[T](implicit att: AbsTypeTag[T]): Type = att.tpe
def atypeOf[T](implicit att: WeakTypeTag[T]): Type = att.tpe
/** Constructs a unique term name with the given prefix within this Context.
* (The current implementation uses Context.fresh, which increments*/

View File

@ -18,7 +18,7 @@ trait Instance
}
trait Convert
{
def apply[T: c.AbsTypeTag](c: scala.reflect.macros.Context)(in: c.Tree): c.Tree
def apply[T: c.WeakTypeTag](c: scala.reflect.macros.Context)(in: c.Tree): c.Tree
}
trait MonadInstance extends Instance
{
@ -81,7 +81,7 @@ object Instance
* this should be the argument wrapped in Right.
*/
def contImpl[T](c: Context, i: Instance with Singleton, convert: Convert, builder: TupleBuilder)(t: Either[c.Expr[T], c.Expr[i.M[T]]])(
implicit tt: c.AbsTypeTag[T], it: c.TypeTag[i.type]): c.Expr[i.M[T]] =
implicit tt: c.WeakTypeTag[T], it: c.TypeTag[i.type]): c.Expr[i.M[T]] =
{
import c.universe.{Apply=>ApplyTree,_}
@ -203,7 +203,7 @@ object Instance
tree match
{
case ApplyTree(TypeApply(fun, t :: Nil), qual :: Nil) if isWrapper(fun) =>
val tag = c.AbsTypeTag(t.tpe)
val tag = c.WeakTypeTag(t.tpe)
addType(t.tpe, convert(c)(qual)(tag) )
case _ => super.transform(tree)
}