package appmacro
- Alphabetic
- Public
- All
Type Members
- trait BuilderResult[C <: Context with Singleton] extends AnyRef
-
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. UseContextUtil[c.type](c)to construct. - abstract class Convert extends AnyRef
- sealed trait Converted[C <: Context with Singleton] extends AnyRef
-
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.
- trait LinterDSL extends AnyRef
- trait MonadInstance extends Instance
-
trait
TupleBuilder extends AnyRef
A
TupleBuilderabstracts the work of constructing a tuple data structure such as aTupleNorKListand extracting values from it.A
TupleBuilderabstracts the work of constructing a tuple data structure such as aTupleNorKListand extracting values from it. TheInstancemacro implementation will (roughly) traverse the tree of its argument and ultimately obtain a list of expressions with typeM[T]for different typesT. The macro constructs anInputvalue for each of these expressions that contains theTypeforT, theTreefor the expression, and aValDefthat will hold the value for the input.TupleBuilder.applyis provided with the list ofInputs and is expected to provide three values in the returned BuilderResult. First, it returns the constructed tuple data structure Tree ininput. Next, it provides the type constructorrepresentationCthat, when applied to M, gives the type of tuple data structure. For example, a builder that constructs aTuple3for inputsM[Int],M[Boolean], andM[String]would provide a Type representing[L[x]] (L[Int], L[Boolean], L[String]). Theinputmethod would return a value whose type is that type constructor applied to M, or(M[Int], M[Boolean], M[String]).Finally, the
extractmethod provides a list of vals that extract information from the applied input. The type of the applied input is the type constructor applied toId([X] X). The returned list of ValDefs should be the ValDefs frominputs, but with non-empty right-hand sides.
Value Members
- object ContextUtil
- object Converted
- object Instance
-
object
KListBuilder extends TupleBuilder
A
TupleBuilderthat uses a KList as the tuple representation. - object LinterDSL
-
object
MixedBuilder extends TupleBuilder
A builder that uses
TupleNas the representation for small numbers of inputs (up toTupleNBuilder.MaxInputs) andKListfor larger numbers of inputs.A builder that uses
TupleNas the representation for small numbers of inputs (up toTupleNBuilder.MaxInputs) andKListfor larger numbers of inputs. This builder cannot handle fewer than 2 inputs. - object StringTypeTag
-
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.