Skip to content

Instantly share code, notes, and snippets.

View xeno-by's full-sized avatar

Eugene Burmako xeno-by

View GitHub Profile
[info] when verifying Template.this.parents.length.!=(0).&&(Template.this.parents.tail.exists(((x$3) => x$3.argss.nonEmpty))).`unary_!`
[info] found that Template.this.parents.length is not equal to 0
[info] and also Template.this.parents.tail.forall(((x$3) => x$3.argss.nonEmpty.`unary_!`)) is false
[info] context is Template(List(),List(Parent(Ident(),List(List())), Parent(Ident(),List(List()))),Self(None,None),List())
[info] when verifying !(parents.length != 0 && parents.tail.exists((_.argss.nonEmpty)))
[info] found that parents.length is not equal to 0
[info] and also parents.tail.forall(_.argss.empty) is false
[info] context is Template(List(),List(Parent(Ident(),List(List())), Parent(Ident(),List(List()))),Self(None,None),List())
17:20 ~/Projects/Master/sandbox (master)$ st
[[syntax trees at end of typer]] // Test.scala
package <empty> {
abstract trait B extends scala.AnyRef;
class C1 extends scala.AnyRef {
def <init>(): C1 = {
C1.super.<init>();
()
};
private[this] val x1: C1 = this;
17:19 ~/Projects/Master/sandbox (master)$ st
[[syntax trees at end of typer]] // Test.scala
package <empty> {
abstract trait B extends scala.AnyRef;
class C1 extends scala.AnyRef {
def <init>(): C1 = {
C1.super.<init>();
()
};
scala.this.Predef.println(this)
18:09 ~/Projects/210x/sandbox (2.10.x)$ scala
Welcome to Scala version 2.10.5-20140326-123924-c74e1325ff (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_40).
Type in expressions to have them evaluated.
Type :help for more information.
scala> val tpe1 = typeOf[Some[Int]]
tpe1: reflect.runtime.universe.Type = scala.Some[Int]
scala> val tpe2a = typeOf[Option[_]]
tpe2a: reflect.runtime.universe.Type = scala.Option[_]
// *** What we want to do ***
// Write a mini-cake that would take and return path-dependent universe artifacts
// retaining precise path-dependent types when returning values
trait Universe {
type Tree
}
object ru extends Universe {
class Tree
// *** What we want to do ***
// Write a mini-cake that would take and return path-dependent universe artifacts
// retaining precise path-dependent types when returning values
trait Universe {
type Tree
}
object ru extends Universe {
class Tree
trait Universe {
type Tree
}
trait NscContext {
type Tree = universe.Tree
val universe: Universe
def macroApplication: Tree
}
import scala.language.experimental.macros
import scala.reflect.macros.Context
import scala.annotation.StaticAnnotation
class csvTyped(val sample: String)(funcs: (String => Any)*) extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro Macros.impl
}
object Macros {
def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = {
16:10 ~/Projects/SBT (palladium0)$ sbt-the-rebel-cut -v "scripted project/setting-macro"No extra sbt options have been defined
Detected sbt version 0.13.1
Using /Users/xeno_by/.sbt/0.13.1 as sbt dir, -sbt-dir to override.
Using default jvm options
# Executing command line:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
-Dfile.encoding=UTF8
-XX:MaxPermSize=384m
-Xms512m
-Xmx1536m
16:00 ~/Projects/SBT (palladium0)$ sbt-the-rebel-cut -v -scala-version 2.11.0-M8 -scala-home "$(scala-root)/build/pack" "scripted project/setting-macro"
No extra sbt options have been defined
Detected sbt version 0.13.1
Using /Users/xeno_by/.sbt/0.13.1 as sbt dir, -sbt-dir to override.
Using default jvm options
# Executing command line:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
-Dfile.encoding=UTF8
-XX:MaxPermSize=384m
-Xms512m