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

Value Members

  1. val W: Witness.type

    Permalink

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

    Alias for shapeless.Witness that 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.Witness won'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.

  2. package api

    Permalink
  3. object auto

    Permalink

    Module that provides automatic refinements and automatic conversions between refined types (refinement subtyping) at compile-time.

  4. object boolean extends BooleanValidate with BooleanInference0

    Permalink

    Module for logical predicates.

  5. object char extends CharValidate

    Permalink

    Module for Char related predicates.

  6. object collection extends CollectionValidate with CollectionInference

    Permalink

    Module for collection predicates.

  7. object generic extends GenericValidate with GenericInference

    Permalink

    Module for generic predicates.

  8. package internal

    Permalink
  9. package macros

    Permalink
  10. object numeric extends NumericValidate with NumericInference

    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 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.Equal can also be used for numeric types.

  11. def refineMT[P]: RefineMPartiallyApplied[@@, P]

    Permalink

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

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

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

  12. def refineMV[P]: RefineMPartiallyApplied[Refined, P]

    Permalink

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

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

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

  13. def refineT[P]: RefinePartiallyApplied[@@, P]

    Permalink

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

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

    Note: T stands for tag.

  14. def refineV[P]: RefinePartiallyApplied[Refined, P]

    Permalink

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

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

    Note: V stands for value class.

  15. object string extends StringValidate with StringInference

    Permalink

    Module for String related predicates.

    Module for String related predicates. Note that most of the predicates in collection also work for Strings by treating them as sequences of Chars.

  16. package util

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped