object auto
Module that provides automatic refinements and automatic conversions between refined types (refinement subtyping) at compile-time.
- Source
- auto.scala
- Alphabetic
- By Inheritance
- auto
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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]toF[T, B]if there is a valid inferenceA ==> B.Implicitly converts (at compile-time) a value of type
F[T, A]toF[T, B]if there is a valid inferenceA ==> 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
-
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
TwithPiftsatisfies the predicateP.Implicitly tags (at compile-time) a value of type
TwithPiftsatisfies the predicateP. If it does not satisfy the predicate, compilation fails.This is an implicit version of
refineMT. -
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
Tinapi.Refined[T, P]iftsatisfies the predicateP.Implicitly wraps (at compile-time) a value of type
Tinapi.Refined[T, P]iftsatisfies the predicateP. If it does not satisfy the predicate, compilation fails.This is an implicit version of
refineMV. -
implicit
def
autoUnwrap[F[_, _], T](tp: F[T, _])(implicit rt: RefType[F]): T
Implicitly unwraps the
Tfrom a value of typeF[T, P]using theapi.RefTypeinstance ofF.Implicitly unwraps the
Tfrom a value of typeF[T, P]using theapi.RefTypeinstance ofF. This allows aF[T, P]to be used as it were a subtype ofT.Note: This conversion is not needed if
F[T, _] <: Tholds (which is the case forshapeless.tag.@@, for example). -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )