eu.timepit.refined

auto

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
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. implicit 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
    Annotations
    @macroImpl( ... )
  8. implicit 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.

    Annotations
    @macroImpl( ... )
  9. implicit 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.

    Annotations
    @macroImpl( ... )
  10. 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 shapeless.tag.@@, for example).

  11. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  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