spire.macrosk

Ops

object Ops

This trait has some nice methods for working with implicit Ops classes.

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

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def binop[A, R](c: Context)(rhs: scala.reflect.macros.Context.Expr[A]): scala.reflect.macros.Context.Expr[R]

    Given context and an expression, this method rewrites the tree to call the "desired" method with the lhs and rhs parameters.

    Given context and an expression, this method rewrites the tree to call the "desired" method with the lhs and rhs parameters. We find the symbol which is applying the macro and use its name to determine what method to call.

    Users write code like:

    x + y

    After typing and implicit resolution, we get trees like:

    ringOps[A](x:A)(ev:R[A]).+(y:A)

    and we want to get out:

    ev.method(x:A, y:A)

    So, we need to decompose ringOps[A](x)(ev) to get x and ev, and we need to map "+" into "plus".

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def findMethodName(c: Context): String

    Provide a canonical mapping between "operator names" used in Ops classes and the actual method names used for type classes.

    Provide a canonical mapping between "operator names" used in Ops classes and the actual method names used for type classes.

    This is an interesting directory of the operators Spire supports. It's also worth noting that we don't (currently) have the capacity to dispatch to two different typeclass-method names for the same operator--typeclasses have to agree to use the same name for the same operator.

    In general "textual" method names should just pass through to the typeclass... it is probably not wise to provide mappings for them here.

  13. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. def unop[R](c: Context)(): scala.reflect.macros.Context.Expr[R]

    Given context, this method rewrites the tree to call the desired method with the lhs parameter.

    Given context, this method rewrites the tree to call the desired method with the lhs parameter. We find the symbol which is applying the macro and use its name to determine what method to call.

    Users write code like:

    -x

    After typing and implicit resolution, we get trees like:

    ringOps[A](x:A)(ev:R[A]).unary_-()

    and we want to get out:

    ev.negate(x:A)

    So, we need to decompose ringOps[A](x)(ev) to get x and ev, and we need to map "unary_-" into "negate".

  22. def unpack[T[_], A](c: Context): (Tree, Tree)

    Given context, this method pulls 'evidence' and 'lhs' values out of instantiations of implicit -Ops classes.

    Given context, this method pulls 'evidence' and 'lhs' values out of instantiations of implicit -Ops classes. For instance,

    Given "new FooOps(x)(ev)", this method returns (ev, x).

  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped