Package

eu.timepit.refined

api

Permalink

package api

Visibility
  1. Public
  2. All

Type Members

  1. final case class Failed[A](detail: A) extends Result[A] with Product with Serializable

    Permalink
  2. case class Inference[P, C](isValid: Boolean, show: String) extends Product with Serializable

    Permalink

    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. final case class Passed[A](detail: A) extends Result[A] with Product with Serializable

    Permalink
  4. trait RefType[F[_, _]] extends Serializable

    Permalink

    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

    • the Refined value class
    • and shapeless.tag.@@ which is a subtype of its first parameter (i.e. (T @@ P) <: T)
  5. final class Refined[T, P] extends AnyVal with Serializable

    Permalink

    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.

  6. sealed abstract class Result[A] extends Product with Serializable

    Permalink
  7. trait Validate[T, P] extends Serializable

    Permalink

    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

    Permalink
  2. object RefType extends Serializable

    Permalink
  3. object Refined extends Serializable

    Permalink
  4. object Result extends Serializable

    Permalink
  5. object Validate extends Serializable

    Permalink

Ungrouped