package refined
- Source
- package.scala
- Alphabetic
- By Inheritance
- refined
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Package Members
Value Members
- val W: Witness.type
Alias for
shapeless.Witnessthat provides concise syntax for literal-based singleton types.Alias for
shapeless.Witnessthat provides concise syntax for literal-based 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 the shapeless wiki for more information about its support for singleton types.
Note that if a future version of Scala implements SIP-23,
shapeless.Witnesswon't be necessary anymore to express literal-based singleton types. It will then be possible to use literals directly in a position where a type is expected. - def refineMT[P]: RefineMPartiallyApplied[@@, P]
Alias for
api.RefType.refineM[P]withshapeless.tag.@@as type parameter forapi.RefType.Alias for
api.RefType.refineM[P]withshapeless.tag.@@as type parameter forapi.RefType.Note:
Mstands for macro andTstands for tag. - def refineMV[P]: RefineMPartiallyApplied[Refined, P]
Alias for
api.RefType.refineM[P]withapi.Refinedas type parameter forapi.RefType.Alias for
api.RefType.refineM[P]withapi.Refinedas type parameter forapi.RefType.Note:
Mstands for macro andVstands for value class. - def refineT[P]: RefinePartiallyApplied[@@, P]
Alias for
api.RefType.refine[P]withshapeless.tag.@@as type parameter forapi.RefType.Alias for
api.RefType.refine[P]withshapeless.tag.@@as type parameter forapi.RefType.Note:
Tstands for tag. - def refineV[P]: RefinePartiallyApplied[Refined, P]
Alias for
api.RefType.refine[P]withapi.Refinedas type parameter forapi.RefType.Alias for
api.RefType.refine[P]withapi.Refinedas type parameter forapi.RefType.Note:
Vstands for value class. - object auto
Module that provides automatic refinements and automatic conversions between refined types (refinement subtyping) at compile-time.
- object boolean extends BooleanInference0
Module for logical predicates.
- object char
Module for
Charrelated predicates. - object collection extends CollectionInference
Module for collection predicates.
- object generic extends GenericInference
Module for generic predicates.
- object numeric extends NumericInference
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 asWin refined) which include subtypes ofInt,Long,Double,Charetc.Example:
scala> import eu.timepit.refined.api.Refined | import eu.timepit.refined.numeric.Greater | import shapeless.nat._5 scala> refineMV[Greater[_5]](10) res1: Int Refined Greater[_5] = 10 scala> refineMV[Greater[W.`1.5`.T]](1.6) res2: Double Refined Greater[W.`1.5`.T] = 1.6
Note:
generic.Equalcan also be used for numeric types. - object string extends StringInference
Module for
Stringrelated predicates.Module for
Stringrelated predicates. Note that most of the predicates incollectionalso work forStrings by treating them as sequences ofChars.