Evidence that states if the conclusion C can be inferred from the
premise P or not.
Type class defining the maximum value of a given type
Type class defining the minimum value of a given type
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
Refined value classshapeless.tag.@@ which is a subtype of its first parameter
(i.e. (T @@ P) <: T)
Wraps a value of type T that satisfies the predicate P.
Type class that combines RefType and Validate instances
for a refined type FTP.
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)
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.
Evidence that states if the conclusion
Ccan be inferred from the premisePor not.This type class is used to implement refinement subtyping. If a valid
Inference[P, C]exists, the typeF[T, P]is considered a subtype ofF[T, C].