com.github.retronym.macrocosm

Macrocosm

object Macrocosm

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Macrocosm
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class Lenser[A] extends Dynamic

  2. class NumericOps[T] extends AnyRef

  3. class RichStringContext extends AnyRef

  4. class Util[C <: Context] extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Lenser

  7. object NumericOps

  8. implicit def Util(context: Context): Util[context.type]

  9. def arrayForeachWithIndex[A](array: Array[A])(f: (A, Int) ⇒ Unit): Unit

    Fast, indexed, foreach over an array, translated to a while loop.

    Fast, indexed, foreach over an array, translated to a while loop.

    arrayForeachWithIndex(as)((a, i) => println((a, i)))

    Translated to:

    {
    val $array = as
    var $i = 0
    val $len = array.length
    while ($i < $len) {
      val $a = array.apply($i)
      f($a, $i);
      $i += 1
    }
    }

    where the f is inlined.

    Annotations
    @macroImpl()
  10. def arrayForeachWithIndexImpl[A](c: Context)(array: scala.reflect.macros.Context.Expr[Array[A]])(f: scala.reflect.macros.Context.Expr[(A, Int) ⇒ Unit])(implicit arg0: scala.reflect.macros.Context.WeakTypeTag[A]): scala.reflect.macros.Context.Expr[Unit]

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def assert1(cond: Boolean): Unit

    Assert that cond is true.

    Assert that cond is true. The tree of cond is used as the assertion message.

    Annotations
    @macroImpl()
  13. def assert1Impl(c: Context)(cond: scala.reflect.macros.Context.Expr[Boolean]): scala.reflect.macros.Universe.Expr[Unit]

  14. def bImpl(c: Context)(): scala.reflect.macros.Context.Expr[Int]

  15. def cfor[A](zero: A)(okay: (A) ⇒ Boolean, next: (A) ⇒ A)(act: (A) ⇒ Unit): Unit

    This call:

    This call:

    cfor(zero = 0)(okay = _ < 10, next = _ += 2) { println(_) }

    Translates to:

    val a = zero
    while (okay(a)) {
      act(a)
      a = next(a)
    }

    where the bodies of okay, next, and act are inlined.

    Annotations
    @macroImpl()
  16. def cforImpl[A](c: Context)(zero: scala.reflect.macros.Context.Expr[A])(okay: scala.reflect.macros.Context.Expr[(A) ⇒ Boolean], next: scala.reflect.macros.Context.Expr[(A) ⇒ A])(act: scala.reflect.macros.Context.Expr[(A) ⇒ Unit])(implicit arg0: scala.reflect.macros.Context.WeakTypeTag[A]): scala.reflect.macros.Context.Expr[Unit]

  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def desugar(a: Any): String

    returns

    the tree of a after the typer, printed as source code.

    Annotations
    @macroImpl()
  19. def desugarImpl(c: Context)(a: scala.reflect.macros.Context.Expr[Any]): scala.reflect.macros.Context.Expr[Nothing]

  20. implicit def enrichStringContext(sc: StringContext): RichStringContext

  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. implicit def infixNumericOps[T](x: T)(implicit num: Numeric[T]): NumericOps[T]

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def iteratorForeach[A](iterator: Iterator[A])(act: (A) ⇒ Unit): Unit

    Converts:

    Converts:

    iteratorForeach(iterator)(a => <body>)

    To:

    while(iterator.hasNext) f(iterator.next())

    where f is inlined.

    Annotations
    @macroImpl()
  29. def iteratorForeachImpl[A](c: Context)(iterator: scala.reflect.macros.Context.Expr[Iterator[A]])(act: scala.reflect.macros.Context.Expr[(A) ⇒ Unit])(implicit arg0: scala.reflect.macros.Context.WeakTypeTag[A]): scala.reflect.macros.Context.Expr[Unit]

  30. def lens[T]: Lenser[T]

    Automatic lens generation.

    Automatic lens generation.

    case class Foo(a: Int)
    val l = lens[Foo].a
    val foo = Foo(0)
    l._1(foo) // 0
    l._2(foo, 1) // Foo(1)
  31. def log[A](a: A): A

    log("".isEmpty) // prints: "".isEmpty = true

    log("".isEmpty) // prints: "".isEmpty = true

    Annotations
    @macroImpl()
  32. def logImpl[A](c: Context)(a: scala.reflect.macros.Context.Expr[A])(implicit arg0: scala.reflect.macros.Context.WeakTypeTag[A]): scala.reflect.macros.Context.Expr[A]

  33. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  36. def regex(s: String): Regex

    Statically checked version of "some([Rr]egex)".r.

    Statically checked version of "some([Rr]egex)".r. Invalid regular expressions trigger a compile failure. At runtime, the regex is parsed again.

    scala> regex(".*")
    res0: scala.util.matching.Regex = .*
    
    scala> regex("{")
    <console>:11: error: exception during macro expansion: Illegal repetition
    {
              regex("{")
                   ^
    Annotations
    @macroImpl()
  37. def regexImpl(c: Context)(s: scala.reflect.macros.Context.Expr[String]): scala.reflect.macros.Context.Expr[Regex]

  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. def trace[A](expr: A): A

    Trace execution on c, by printing the values of sub-expressions to standard out.

    Trace execution on c, by printing the values of sub-expressions to standard out.

    Annotations
    @macroImpl()
  41. def traceImpl[A](c: Context)(expr: scala.reflect.macros.Context.Expr[A])(implicit arg0: scala.reflect.macros.Context.WeakTypeTag[A]): scala.reflect.macros.Context.Expr[A]

  42. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  43. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  44. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped