Packages

package api

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final case class Failed[A](detail: A) extends Result[A] with Product with Serializable
  2. case class Inference[P, C](isValid: Boolean, show: String) extends Product with Serializable

    Evidence that states if the conclusion C can be inferred from the premise P or not.

    Evidence that states if the conclusion C can be inferred from the premise P or not.

    This type class is used to implement refinement subtyping. If a valid Inference[P, C] exists, the type F[T, P] is considered a subtype of F[T, C].

  3. trait LowPriorityMaxInstances extends AnyRef
  4. trait LowPriorityMinInstances extends AnyRef
  5. trait Max[T] extends AnyRef

    Type class defining the maximum value of a given type

  6. trait MaxInstances extends LowPriorityMaxInstances
  7. trait Min[T] extends AnyRef

    Type class defining the minimum value of a given type

  8. trait MinInstances extends LowPriorityMinInstances
  9. final case class Passed[A](detail: A) extends Result[A] with Product with Serializable
  10. trait RefType[F[_, _]] extends Serializable

    Type class that allows F to be used as carrier type of a refinement.

    Type class that allows F to be used as carrier type of a refinement. The first type parameter of F is the base type that is being refined by its second type parameter which is the type-level predicate that denotes the refinement. Consequently, F[T, P] is a phantom type that only contains a value of type T.

    The library provides instances of RefType for

  11. final class Refined[T, P] extends AnyVal with Serializable

    Wraps a value of type T that satisfies the predicate P.

    Wraps a value of type T that satisfies the predicate P. Instances of this class can be created with refineV and refineMV which verify that the wrapped value satisfies P.

  12. trait RefinedType[FTP] extends Serializable

    Type class that combines RefType and Validate instances for a refined type FTP.

  13. class RefinedTypeOps[FTP, T] extends Serializable

    Provides functions to create values of the refined type FTP from values of the base type T.

    Provides functions to create values of the refined type FTP from values of the base type T. It is intended to simplify the definition of a refined type's companion object.

    Example:

    scala> import eu.timepit.refined.api.{ Refined, RefinedTypeOps }
         | import eu.timepit.refined.numeric.Positive
    
    scala> type PosInt = Int Refined Positive
    
    scala> object PosInt extends RefinedTypeOps[PosInt, Int]
    
    scala> PosInt(1)
    res0: PosInt = 1
    
    scala> PosInt.from(2)
    res1: Either[String, PosInt] = Right(2)
  14. sealed abstract class Result[A] extends Product with Serializable
  15. trait Validate[T, P] extends Serializable

    Type class for validating values of type T according to a type-level predicate P.

    Type class for validating values of type T according to a type-level predicate P. The semantics of P are defined by the instance(s) of this type class for P.

Value Members

  1. object Inference extends Serializable
  2. object Max extends MaxInstances
  3. object Min extends MinInstances
  4. object RefType extends Serializable
  5. object Refined extends Serializable
  6. object RefinedType extends Serializable
  7. object RefinedTypeOps extends Serializable
  8. object Result extends Serializable
  9. object Validate extends Serializable

Ungrouped