Packages

object auto

Module that provides automatic refinements and automatic conversions between refined types (refinement subtyping) at compile-time.

Source
auto.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. auto
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. implicit macro def autoInfer[F[_, _], T, A, B](ta: F[T, A])(implicit rt: RefType[F], ir: ==>[A, B]): F[T, B]

    Implicitly converts (at compile-time) a value of type F[T, A] to F[T, B] if there is a valid inference A ==> B.

    Implicitly converts (at compile-time) a value of type F[T, A] to F[T, B] if there is a valid inference A ==> B. If the inference is invalid, compilation fails.

    Example:

    scala> import eu.timepit.refined.api.Refined
         | import eu.timepit.refined.auto.{ autoInfer, autoRefineV }
         | import eu.timepit.refined.numeric.Greater
    
    scala> val x: Int Refined Greater[W.`5`.T] = 100
    
    scala> x: Int Refined Greater[W.`0`.T]
    res0: Int Refined Greater[W.`0`.T] = 100
  6. implicit macro def autoRefineT[T, P](t: T)(implicit rt: RefType[@@], v: Validate[T, P]): @@[T, P]

    Implicitly tags (at compile-time) a value of type T with P if t satisfies the predicate P.

    Implicitly tags (at compile-time) a value of type T with P if t satisfies the predicate P. If it does not satisfy the predicate, compilation fails.

    This is an implicit version of refineMT.

  7. implicit macro def autoRefineV[T, P](t: T)(implicit rt: RefType[Refined], v: Validate[T, P]): Refined[T, P]

    Implicitly wraps (at compile-time) a value of type T in api.Refined[T, P] if t satisfies the predicate P.

    Implicitly wraps (at compile-time) a value of type T in api.Refined[T, P] if t satisfies the predicate P. If it does not satisfy the predicate, compilation fails.

    This is an implicit version of refineMV.

  8. implicit def autoUnwrap[F[_, _], T](tp: F[T, _])(implicit rt: RefType[F]): T

    Implicitly unwraps the T from a value of type F[T, P] using the api.RefType instance of F.

    Implicitly unwraps the T from a value of type F[T, P] using the api.RefType instance of F. This allows a F[T, P] to be used as it were a subtype of T.

    Example:

    scala> import eu.timepit.refined.api.Refined
         | import eu.timepit.refined.auto.{ autoRefineV, autoUnwrap }
         | import eu.timepit.refined.numeric.Positive
    
    scala> def plusOne(i: Int): Int = i + 1
         | val x: Int Refined Positive = 42
    
    // converts x implicitly to an Int:
    scala> plusOne(x)
    res0: Int = 43

    Note: This conversion is not needed if F[T, _] <: T holds (which is the case for [email protected]@, for example).

  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  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
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped