Packages

p

sbt.internal.util

appmacro

package appmacro

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait BuilderResult[C <: Context with Singleton] extends AnyRef
  2. final class ContextUtil[C <: Context] extends AnyRef

    Utility methods for macros.

    Utility methods for macros. Several methods assume that the context's universe is a full compiler (scala.tools.nsc.Global). This is not thread safe due to the underlying Context and related data structures not being thread safe. Use ContextUtil[c.type](c) to construct.

  3. abstract class Convert extends AnyRef
  4. sealed trait Converted[C <: Context with Singleton] extends AnyRef
  5. trait Instance extends AnyRef

    The separate hierarchy from Applicative/Monad is for two reasons.

    The separate hierarchy from Applicative/Monad is for two reasons.

    1. The type constructor is represented as an abstract type because a TypeTag cannot represent a type constructor directly. 2. The applicative interface is uncurried.

  6. trait LinterDSL extends AnyRef
  7. trait MonadInstance extends Instance
  8. trait TupleBuilder extends AnyRef

    A TupleBuilder abstracts the work of constructing a tuple data structure such as a TupleN or KList and extracting values from it.

    A TupleBuilder abstracts the work of constructing a tuple data structure such as a TupleN or KList and extracting values from it. The Instance macro implementation will (roughly) traverse the tree of its argument and ultimately obtain a list of expressions with type M[T] for different types T. The macro constructs an Input value for each of these expressions that contains the Type for T, the Tree for the expression, and a ValDef that will hold the value for the input.

    TupleBuilder.apply is provided with the list of Inputs and is expected to provide three values in the returned BuilderResult. First, it returns the constructed tuple data structure Tree in input. Next, it provides the type constructor representationC that, when applied to M, gives the type of tuple data structure. For example, a builder that constructs a Tuple3 for inputs M[Int], M[Boolean], and M[String] would provide a Type representing [L[x]] (L[Int], L[Boolean], L[String]). The input method would return a value whose type is that type constructor applied to M, or (M[Int], M[Boolean], M[String]).

    Finally, the extract method provides a list of vals that extract information from the applied input. The type of the applied input is the type constructor applied to Id ([X] X). The returned list of ValDefs should be the ValDefs from inputs, but with non-empty right-hand sides.

Value Members

  1. object ContextUtil
  2. object Converted
  3. object Instance
  4. object KListBuilder extends TupleBuilder

    A TupleBuilder that uses a KList as the tuple representation.

  5. object LinterDSL
  6. object MixedBuilder extends TupleBuilder

    A builder that uses TupleN as the representation for small numbers of inputs (up to TupleNBuilder.MaxInputs) and KList for larger numbers of inputs.

    A builder that uses TupleN as the representation for small numbers of inputs (up to TupleNBuilder.MaxInputs) and KList for larger numbers of inputs. This builder cannot handle fewer than 2 inputs.

  7. object StringTypeTag
  8. object TupleNBuilder extends TupleBuilder

    A builder that uses a TupleN as the tuple representation.

    A builder that uses a TupleN as the tuple representation. It is limited to tuples of size 2 to MaxInputs.

Ungrouped