Package

eu.timepit

refined

Permalink

package refined

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. refined
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class InferenceRule[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.

  2. trait Predicate[P, T] 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.

  3. trait RefType[F[_, _]] extends Serializable

    Permalink

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

    Type class that allows F to be used as result type of a refinement. The first type parameter of F is the 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)
  4. final case class Refined[T, P] extends AnyVal with Product 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.

Value Members

  1. object BuildInfo extends Product with Serializable

    Permalink

    This object was generated by sbt-buildinfo.

  2. object InferenceRule extends Serializable

    Permalink
  3. object Predicate extends Serializable

    Permalink
  4. object RefType extends Serializable

    Permalink
  5. object Refined extends Serializable

    Permalink
  6. val W: Witness.type

    Permalink

    Alias for shapeless.Witness that provides concise syntax for literal singleton types.

    Alias for shapeless.Witness that provides concise syntax for literal singleton types.

    Example:

    scala> val d: W.`3.14`.T = 3.14
    d: Double(3.14) = 3.14
    
    scala> val s: W.`"abc"`.T = "abc"
    s: String("abc") = abc

    See https://github.com/milessabin/shapeless/wiki/Feature-overview:-shapeless-2.0.0#singleton-typed-literals for more information about shapeless' support for singleton types.

  7. object boolean extends BooleanPredicates with BooleanInferenceRules0

    Permalink
  8. object char extends CharPredicates

    Permalink
  9. object collection extends CollectionPredicates with CollectionInferenceRules

    Permalink
  10. object generic extends GenericPredicates with GenericInferenceRules

    Permalink
  11. object implicits

    Permalink
  12. package internal

    Permalink
  13. object numeric extends NumericPredicates with NumericInferenceRules

    Permalink

    Module for numeric predicates.

    Module for numeric predicates. Predicates that take type parameters support both shapeless' natural numbers (Nat) and numeric singleton types (which are made available by shapeless' Witness - abbreviated as W in refined) which include subtypes of Int, Long, Double, Char etc.

    Example:

    scala> import shapeless.nat._
         | import shapeless.tag.@@
         | import eu.timepit.refined.numeric._
    
    scala> refineMT[Greater[_5]](10)
    res1: Int @@ Greater[_5] = 10
    
    scala> refineMT[Greater[W.`1.5`.T]](1.6)
    res2: Double @@ Greater[W.`1.5`.T] = 1.6
  14. def refineMT[P]: RefineMAux[@@, P]

    Permalink

    Alias for RefType.refineM[P] with shapeless.tag.@@ as type parameter for RefType.

    Alias for RefType.refineM[P] with shapeless.tag.@@ as type parameter for RefType.

    Note: M stands for macro and T stands for tag.

  15. def refineMV[P]: RefineMAux[Refined, P]

    Permalink

    Alias for RefType.refineM[P] with Refined as type parameter for RefType.

    Alias for RefType.refineM[P] with Refined as type parameter for RefType.

    Note: M stands for macro and V stands for value class.

  16. def refineT[P]: RefineAux[@@, P]

    Permalink

    Alias for RefType.refine[P] with shapeless.tag.@@ as type parameter for RefType.

    Alias for RefType.refine[P] with shapeless.tag.@@ as type parameter for RefType.

    Note: T stands for tag.

  17. def refineV[P]: RefineAux[Refined, P]

    Permalink

    Alias for RefType.refine[P] with Refined as type parameter for RefType.

    Alias for RefType.refine[P] with Refined as type parameter for RefType.

    Note: V stands for value class.

  18. object string extends StringPredicates with StringInferenceRules

    Permalink
  19. package util

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped