score:0
type Lambda
def foo2[A]: Unit = macro impl[A, {type A = Option[Int]}]
def impl[A: c.WeakTypeTag, B: c.WeakTypeTag](c: blackbox.Context): c.Expr[Unit] = {
import c.universe._
//Option[Int]
println(c.weakTypeOf[B].members.find(_.isType).get.typeSignature)
reify(())
}
Source: stackoverflow.com
Related Query
- Partial application of Scala macros
- Usefulness (as in practical applications) of Currying v.s. Partial Application in Scala
- Why does Scala require partial application of curried functions when assigning to a val?
- Partial application of curried constructors in Scala
- Does Scala support partial application of type constructors?
- Scala partial application unclear
- Partial application in Scala not referentially transparent?
- Scala partial application via underscore when composing function literals
- Scala function partial application
- dependency injection vs partial application in Scala
- Partial Function Application in Scala
- scala method vs function partial application
- scala parameter partial application
- How to use Scala macros to create new partial functions or transform them?
- Scala Partial Function Application Semantics + locking with synchronized
- Documenting Scala 2.10 macros
- Scala application structure
- Empty partial function in Scala
- Typesafe config: Load additional config from path external to packaged scala application
- permanently hidden warning in scala application
- Using partial functions in Scala - how does it work?
- Static return type of Scala macros
- Scala - case match partial string
- Scala macros and the JVM's method size limit
- Web application development on Scala
- Getting started on Scala + JavaFX desktop application development
- Profiling a Scala Spark application
- Scala IDE (Eclipse) Run as Scala Application
- How to represent a partial update on case classe in Scala ?
- Gradle init project for Scala application
More Query from same tag
- What is the cause of this strange Scala memory leak?
- What methods are generated for Scala case classes?
- HashCode in scala mutable collection
- Reading very large files (~ 1 TB) in sequential blocks
- Scala Builder a object recursively
- Optimal design of Spark job, and ensuring narrow dependencies on pre-partitioned data
- Synchronous event triggering
- Getting Nested StructType value within an Array inside Dataframe without using explode
- How to parse json with spray json that uses snake case (underscore notation) instead of camel case
- Transforming all new rows into new column in Spark with Scala
- Play 2 reverse routing, get route from controller method
- Can this Scala code snippet be made more concise?
- Setting geofencing from coordinate 41.7523,12.8629
- In Scala, what does "extends (A => B)" on a case class mean?
- How do i tell the typesafe activator to serve play applications over https?
- Scala while loop returns Unit all the time
- How do I access post data from scala play?
- How do I check if column present in the Spark DataFrame
- How can I update a Swing canvas at a certain framerate?
- Overriding subclass methods with subclassed arguments?
- How to refactor PlayFramework Action and Async Action to avoid code duplication?
- What is the apply function in Scala?
- How to refer broadcast variable in Spark DataFrameSQL
- Spark repartition to specific resources
- Should I be explicitly failing scala units tests where java counterpart throws exception
- How to do pairwise word-count in Scala using DataFrame
- Sliding Window without watermark in Apache Spark?
- Add a new Column in Spark DataFrame which contains the sum of all values of one column-Scala/Spark
- Scala Equality: Why does this code compile?
- "Error occurred in an application involving default arguments" when trying to use Scala's copy method