Skip to content

Commit

Permalink
upgrade to scala 2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rintcius committed Mar 25, 2013
1 parent 521dfc0 commit c846d1a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ import language.experimental.macros
object MacrocosmGround {
def id[A <: AnyRef](a: A): a.type = macro idImpl[a.type]

def idImpl[A: c.AbsTypeTag](c: Context)(a: c.Expr[A]): c.Expr[A] = a
def idImpl[A: c.WeakTypeTag](c: Context)(a: c.Expr[A]): c.Expr[A] = a
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.12.0
sbt.version=0.12.2
2 changes: 1 addition & 1 deletion project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object build extends Build {
version := "0.2-SNAPSHOT",
// scalaHome := Some(file(System.getProperty("user.home")) / "usr" / "scala-kepler"),
//scalaVersion := "2.10.0-SNAPSHOT",
scalaVersion := "2.10.0-M7",
scalaVersion := "2.10.1",
scalacOptions ++= Seq(), // Seq("-Xlog-free-terms", "-unchecked", /*, "-Ymacro-debug"*/),
resolvers += "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-compiler" % _)
Expand Down
14 changes: 7 additions & 7 deletions src/main/scala/com/github/retronym/macrocosm/Macrocosm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object Macrocosm {
*/
def log[A](a: A): A = macro logImpl[A]

def logImpl[A: c.AbsTypeTag](c: Context)(a: c.Expr[A]): c.Expr[A] = {
def logImpl[A: c.WeakTypeTag](c: Context)(a: c.Expr[A]): c.Expr[A] = {
import c.universe._
val aCode = c.Expr[String](Literal(Constant(show(a.tree))))
c.universe.reify {
Expand Down Expand Up @@ -133,7 +133,7 @@ object Macrocosm {
*/
def trace[A](expr: A) = macro traceImpl[A]

def traceImpl[A: c.AbsTypeTag](c: Context)(expr: c.Expr[A]): c.Expr[A] = {
def traceImpl[A: c.WeakTypeTag](c: Context)(expr: c.Expr[A]): c.Expr[A] = {
import c.universe._

object tracingTransformer extends Transformer {
Expand Down Expand Up @@ -260,7 +260,7 @@ object Macrocosm {
(act: A => Unit): Unit =
macro iteratorForeachImpl[A]

def iteratorForeachImpl[A: c.AbsTypeTag]
def iteratorForeachImpl[A: c.WeakTypeTag]
(c: Context)
(iterator: c.Expr[Iterator[A]])
(act: c.Expr[A => Unit]): c.Expr[Unit] = {
Expand Down Expand Up @@ -301,7 +301,7 @@ object Macrocosm {
def arrayForeachWithIndex[A](array: Array[A])(f: (A, Int) => Unit): Unit =
macro arrayForeachWithIndexImpl[A]

def arrayForeachWithIndexImpl[A: c.AbsTypeTag]
def arrayForeachWithIndexImpl[A: c.WeakTypeTag]
(c: Context)
(array: c.Expr[Array[A]])
(f: c.Expr[(A, Int) => Unit]): c.Expr[Unit] = {
Expand Down Expand Up @@ -341,7 +341,7 @@ object Macrocosm {
def cfor[A](zero: A)(okay: A => Boolean, next: A => A)(act: A => Unit): Unit =
macro cforImpl[A]

def cforImpl[A: c.AbsTypeTag]
def cforImpl[A: c.WeakTypeTag]
(c: Context)
(zero: c.Expr[A])
(okay: c.Expr[A => Boolean], next: c.Expr[A => A])
Expand Down Expand Up @@ -379,10 +379,10 @@ object Macrocosm {
}

object Lenser {
def selectDynamic[T: c.AbsTypeTag](c: Context)(propName: c.Expr[String]) =
def selectDynamic[T: c.WeakTypeTag](c: Context)(propName: c.Expr[String]) =
applyDynamic[T](c)(propName)()

def applyDynamic[T: c.AbsTypeTag]
def applyDynamic[T: c.WeakTypeTag]
(c: Context)
(propName: c.Expr[String])
()
Expand Down

0 comments on commit c846d1a

Please sign in to comment.