Reduce InputTask to the ideal wrapper around 'State => Parser[Initialize[Task[T]]]'

Ref #407.
This commit is contained in:
Mark Harrah 2013-01-28 17:14:53 -05:00
parent e719c5fb2e
commit 2929e4e724
1 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,13 @@ final class ContextUtil[C <: Context](val ctx: C)
/** >: Nothing <: Any */
def emptyTypeBounds: TypeBounds = TypeBounds(definitions.NothingClass.toType, definitions.AnyClass.toType)
def functionType(args: List[Type], result: Type): Type =
{
val global: Global = ctx.universe.asInstanceOf[Global]
val tpe = global.definitions.functionType(args.asInstanceOf[List[global.Type]], result.asInstanceOf[global.Type])
tpe.asInstanceOf[Type]
}
/** Create a Tree that references the `val` represented by `vd`. */
def refVal(vd: ValDef): Tree =
{