Packages

p

shapeless

package shapeless

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. shapeless
  2. ScalaVersionSpecifics
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Package Members

  1. package ops
  2. package syntax
  3. package test

Type Members

  1. sealed trait :+:[+H, +T <: Coproduct] extends Coproduct

    Like Either, the :+: type defines a new type that can contain either H or T.

  2. final case class ::[+H, +T <: HList](head: H, tail: T) extends HList with Product with Serializable

    Non-empty HList element type.

  3. trait <:!<[A, B] extends Serializable
    Annotations
    @implicitNotFound("${A} must not be a subtype of ${B}")
  4. trait =:!=[A, B] extends Serializable
  5. trait AdditiveCollection[Repr] extends Serializable

    Evidence that Repr instances can be nested in a Sized.

    Evidence that Repr instances can be nested in a Sized.

    Should assert that a Builder[_, Repr] given n elements will result in a Repr of length n.

  6. trait Annotation[A, T] extends Serializable

    Evidence that type T has annotation A, and provides an instance of the annotation.

    Evidence that type T has annotation A, and provides an instance of the annotation.

    If type T has an annotation of type A, then an implicit Annotation[A, T] can be found, and its apply method provides an instance of the annotation.

    Example:

    case class First(i: Int)
    
    @First(3) trait Something
    
    
    val somethingFirst = Annotation[First, Something].apply()
    assert(somethingFirst == First(3))
  7. class AnnotationMacros extends CaseClassMacros
    Annotations
    @bundle()
  8. trait Annotations[A, T] extends DepFn0 with Serializable

    Provides the annotations of type A of the fields or constructors of case class-like or sum type T.

    Provides the annotations of type A of the fields or constructors of case class-like or sum type T.

    If type T is case class-like, this type class inspects its fields and provides their annotations of type A. If type T is a sum type, its constructor types are looked for annotations.

    Type Out is an HList having the same number of elements as T (number of fields of T if T is case class-like, or number of constructors of T if it is a sum type). It is made of None.type (no annotation on corresponding field or constructor) and Some[A] (corresponding field or constructor is annotated).

    Method apply provides an HList of type Out made of None (corresponding field or constructor not annotated) or Some(annotation) (corresponding field or constructor has annotation annotation).

    Note that annotation types must be case class-like for this type class to take them into account.

    Example:

    case class First(s: String)
    
    case class CC(i: Int, @First("a") s: String)
    
    sealed trait Base
    @First("b") case class BaseI(i: Int) extends Base
    case class BaseS(s: String) extends Base
    
    
    val ccFirsts = Annotations[First, CC]
    val baseFirsts = Annotations[First, Base]
    
    // ccFirsts.Out is  None.type :: Some[First] :: HNil
    // ccFirsts.apply() is
    //   None :: Some(First("a")) :: HNil
    
    // baseFirsts.Out is  Some[First] :: None.type :: HNil
    // baseFirsts.apply() is
    //   Some(First("b")) :: None :: HNil
  9. class ApplyEverything[F <: Poly] extends AnyRef
  10. trait ApplyUnapplyFacet extends ProductISOFacet
  11. trait BasisConstraint[L <: HList, M <: HList] extends Serializable

    Type class witnessing that every element of L is an element of M.

  12. sealed trait CNil extends Coproduct

    The CNil type is used to terminate a 'list' of :+: alternatives.

    The CNil type is used to terminate a 'list' of :+: alternatives.

    Like the Nil constructor of List, it does not convey real information. This is achieved by not having any value for CNil.

    This makes the type Int :+: CNil equivalent to Int, because the right (Inr) alternative of :+: can not be constructed properly.

  13. final case class Cached[+T](value: T) extends AnyVal with Product with Serializable

    Wraps a cached implicit T.

    Wraps a cached implicit T.

    Looking for an implicit Cached[T] first triggers a look for an implicit T, caches the resulting tree, and returns it immediately and in subsequent look ups for an implicit Cached[T]. Thus, subsequent look ups do not trigger looking for an implicit T, only returning the instance kept in cache.

    Beware that if the contexts in which two subsequent look ups are different, so that looking for a T in each of them doesn't return the same result, this change would be ignored by caching. Looking for a Cached[T] in the first context would put the implicit T of this context in cache, and then looking for a Cached[T] in the second context would return the former instance from the first context. E.g.

    trait TC[T] {
      def msg: String
    }
    
    object First {
      implicit val tc: TC[Int] = new TC[Int] {
        val msg = "first"
      }
    
      def print() = println(implicitly[TC[Int]].msg)
      def printCached() = println(cached[TC[Int]].msg)
    }
    
    object Second {
      implicit val tc: TC[Int] = new TC[Int] {
        val msg = "second"
      }
    
      def print() = println(implicitly[TC[Int]].msg)
      def printCached() = println(cached[TC[Int]].msg)
    }
    
    First.print()
    Second.print()
    First.printCached()
    Second.printCached()

    would print "first" then "second" (non cached TC[Int] instances), then "first" twice (first instance, returned the second time too through the cache).

  14. class CachedImplicitMacros extends AnyRef
    Annotations
    @bundle()
  15. class CachedMacros extends LazyMacros with OpenImplicitMacros
    Annotations
    @bundle()
  16. trait CaseClassFacet extends AnyRef
  17. trait CaseClassMacros extends ReprTypes with CaseClassMacrosVersionSpecifics
    Annotations
    @bundle()
  18. trait CaseClassMacrosVersionSpecifics extends AnyRef
  19. trait CaseInst extends AnyRef
  20. trait Cases extends AnyRef
  21. type Const[C] = AnyRef { type λ[T] = C }
  22. sealed trait Coproduct extends Product with Serializable

    Encodes a coproduct type, such as a sealed family of case classes.

    Encodes a coproduct type, such as a sealed family of case classes.

    Each constructor from the family gets an encoding in terms of nested Inr and Inl.

    Which constructor is encoded as Inl() and which as Inr(Inl()) is determined by lexical order of the subclasses. This example illustrates the encoding:

    scala> sealed trait Animal
    defined trait Animal
    
    scala> case class Cat(name: String, livesLeft: Int) extends Animal
    defined class Cat
    
    scala> case class Dog(name: String, bonesBuried: Int) extends Animal
    defined class Dog
    
    scala> case class Koala(name: String, leavesEaten: Int) extends Animal
    defined class Koala
    
    scala> case class Sloth(name: String, daysToClimbDownFromCurrentTree: Int) extends Animal
    defined class Sloth
    
    scala> val garfield = Cat("Garfield", 9)
    garfield: Cat = Cat(Garfield,9)
    
    scala> val odie = Dog("Odie", 3)
    odie: Dog = Dog(Odie,3)
    
    scala> val koala = Koala("foo", 10)
    koala: Koala = Koala(foo,10)
    
    scala> val sloth = Sloth("bar", 2)
    sloth: Sloth = Sloth(bar,2)
    
    scala> val genAnimal = Generic[Animal]
    genAnimal: shapeless.Generic[Animal]{type Repr = Cat :+: Dog :+: Koala :+: Sloth} = ...
    
    scala> def showCoproduct(o: Any) : String = o match {
         | case Inl(a) => "Inl(" + showCoproduct(a) + ")"
         | case Inr(a) => "Inr(" + showCoproduct(a) + ")"
         | case a => a.toString
         | }
    showCoproduct: (o: Any)String
    
    scala> showCoproduct(genAnimal.to(garfield))
    res5: String = Inl(Cat(Garfield,9))
    
    scala> showCoproduct(genAnimal.to(odie))
    res6: String = Inr(Inl(Dog(Odie,3)))
    
    scala> showCoproduct(genAnimal.to(koala))
    res7: String = Inr(Inr(Inl(Koala(foo,10))))
    
    scala> showCoproduct(genAnimal.to(sloth))
    res8: String = Inr(Inr(Inr(Inl(Sloth(bar,2)))))
    
    scala>
  23. trait CopyFacet extends CaseClassFacet
  24. trait Coselect[T] extends AnyRef
  25. trait Data[F, T, R] extends Serializable

    Type class representing one-level generic queries.

  26. trait Data0 extends AnyRef
  27. trait Data1 extends Data0
  28. trait DataT[F, T] extends Serializable

    Type class representing one-level generic transformations.

  29. trait DataT0 extends AnyRef
  30. trait DataT1 extends DataT0
  31. trait Default[T] extends DepFn0 with Serializable

    Provides default values of case class-like types.

    Provides default values of case class-like types.

    The Out type parameter is an HList type whose length is the number of fields of T. Its elements correspond to the fields of T, in their original order. It is made of None.type (no default value for this field) and Some[...] (default value available for this field, with ... the type of the field). Note that None.type and Some[...] are more precise than simply Option[...], so that the availability of default values can be used in type level calculations.

    The apply method returns an HList of type Out, with None elements corresponding to no default value available, and Some(defaultValue) to default value available for the corresponding fields.

    Use like

    case class CC(i: Int, s: String = "b")
    
    val default = Default[CC]
    
    // default.Out is  None.type :: Some[String] :: HNil
    
    // default() returns
    //   None :: Some("b") :: HNil,
    // typed as default.Out
  32. trait DefaultCaseClassDefns extends ApplyUnapplyFacet with ProductFacet with PolymorphicEqualityFacet with CopyFacet with ToStringFacet
  33. class DefaultMacros extends CaseClassMacros
    Annotations
    @bundle()
  34. trait DefaultSymbolicLabelling[T] extends DepFn0 with Serializable
  35. class DefaultToIndexedSeq[CC[_]] extends AnyRef
  36. trait DepFn0 extends AnyRef

    Dependent nullary function type.

  37. trait DepFn1[T] extends AnyRef

    Dependent unary function type.

  38. trait DepFn2[T, U] extends AnyRef

    Dependent binary function type.

  39. type Everything[F <: Poly, K <: Poly, T] = Case[EverythingAux[F, K], ::[T, HNil]]

    The SYB everything combinator

  40. class EverythingAux[F, K] extends Poly
  41. type Everywhere[F <: Poly, T] = Case[EverywhereAux[F], ::[T, HNil]]

    The SYB everywhere combinator

  42. class EverywhereAux[F] extends Poly
  43. trait FieldOf[V] extends AnyRef

    Field with values of type V.

    Field with values of type V.

    Record keys of this form should be objects which extend this trait. Keys may also be arbitrary singleton typed values, however keys of this form enforce the type of their values.

  44. trait FieldPoly extends Poly1

    Polymorphic function that allows modifications on record fields while preserving the original key types.

  45. trait Fin[N <: Succ[_]] extends AnyRef

    Base trait for type level finite numbers, i.e.

    Base trait for type level finite numbers, i.e. numbers less than some bound N

  46. case class FinSucc[N <: Succ[_], P <: Fin[N]]() extends Fin[Succ[N]] with Product with Serializable

    Encoding of successor.

  47. case class FinZero[N <: Succ[_]]() extends Fin[N] with Product with Serializable

    Encoding of zero.

  48. trait FromProductArgs extends Dynamic

    Trait supporting mapping HList arguments to argument lists, inverse of ProductArgs.

    Trait supporting mapping HList arguments to argument lists, inverse of ProductArgs.

    Mixing in this trait enables method applications of the form,

    lhs.methodProduct(23 :: "foo" :: true)

    to be rewritten as,

    lhs.method(23, "foo", true)

    ie. the HList argument is used to obtain arguments for a target method (the called method named minus the "Product" suffix) in sequence and the application is rewritten to an application of the target method

  49. trait FromRecordArgs extends Dynamic

    Trait supporting mapping record arguments to named argument lists, inverse of RecordArgs.

    Trait supporting mapping record arguments to named argument lists, inverse of RecordArgs.

    Mixing in this trait enables method applications of the form,

    lhs.methodRecord('x ->> 23 :: 'y ->> "foo" :: 'z ->> true :: HNil)

    to be rewritten as,

    lhs.method(x = 23, y = "foo", z = true)

    ie. the record argument is used to look up arguments for a target method (the called method named minus the "Record" suffix) by name and type and the application is rewritten to an application of the target method

  50. trait Generic[T] extends Serializable

    Represents the ability to convert from a concrete type (e.g.

    Represents the ability to convert from a concrete type (e.g. a case class) to a generic (HList / Coproduct} based) representation of the type.

    For example:

    scala> sealed trait Animal
    
    defined trait Animal
    scala> case class Cat(name: String, livesLeft: Int) extends Animal
    defined class Cat
    
    scala> case class Dog(name: String, bonesHidden: Int) extends Animal
    defined class Dog
    
    scala> val genCat = Generic[Cat]
    genCat: shapeless.Generic[Cat]{ type Repr = String :: Int :: HNil } = ...
    
    scala> val genDog = Generic[Dog]
    genDog: shapeless.Generic[Dog]{ type Repr = String :: Int :: HNil } = ...
    
    scala> val garfield = Cat("Garfield", 9)
    garfield: Cat = Cat(Garfield,9)
    
    scala> val genGarfield = genCat.to(garfield)
    genGarfield: genCat.Repr = Garfield :: 9 :: HNil
    
    scala> val reconstructed = genCat.from(genGarfield)
    reconstructed: Cat = Cat(Garfield,9)
    
    scala> reconstructed == garfield
    res0: Boolean = true

    Note that constituents of Cat and Dog are exactly the same - a String and an Int. So we could do:

    scala> val odieAsCat = genCat.from(genDog.to(odie))
    odieAsCat: Cat = Cat(odie,3)

    This is quite useful in certain cases, such as copying from one object type to another, as in schema evolution.

    Note that the generic representation depends on the type at which we instantiate Generic. In the example above we instantiated it at Cat and at Dog, and so the generic representation gave the minimal constituents of each of those.

    However, if we instantiate Generic[Animal] instead the generic representation would encode the Cat-ness or Dog-ness of the instance as well (see Coproduct for details of the encoding):

    scala> genDog.to(odie)
    res9: genDog.Repr = odie :: 3 :: HNil
    
    scala> val genAnimal = Generic[Animal]
    genAnimal: shapeless.Generic[Animal]{ type Repr = Cat :+: Dog :+: CNil } = ...
    
    scala> genAnimal.to(odie)
    res8: genAnimal.Repr = Dog(odie,3)
    
    scala> genAnimal.to(odie) match { case Inr(Inl(dog)) => dog; case _ => null }
    res9: Dog = Dog(odie,3)

    Inr and Inl are shapeless.Coproduct constructors. Shapeless constructs each class representation as a sort of "nested Either" using Coproduct. So in our example, genAnimal would essentially encode garfield as Inl(garfield) and odie as Inr(Inl(odie)). Please see shapeless.Coproduct for more details. }}}

    T

    An immutable data type that has a canonical way of constructing and deconstructing instances (e.g. via apply / unapply). Sealed families of case classes work best.

  51. trait Generic1[F[_], FR[_[_]]] extends Serializable
  52. trait Generic10 extends AnyRef
  53. class Generic1Macros extends CaseClassMacros
    Annotations
    @bundle()
  54. class GenericMacros extends CaseClassMacros
    Annotations
    @bundle()
  55. sealed trait HList extends Product with Serializable

    HList ADT base trait.

  56. class HMap[R[_, _]] extends Poly1

    Heterogenous map with type-level key/value associations that are fixed by an arbitrary relation R.

    Heterogenous map with type-level key/value associations that are fixed by an arbitrary relation R.

    HMaps extend Poly and hence are also polymorphic function values with type-specific cases corresponding to the map's type-level key/value associations.

  57. class HMapBuilder[R[_, _]] extends AnyRef
  58. sealed trait HNil extends HList

    Empty HList element type.

  59. class HasCoproductGeneric[T] extends Serializable
  60. class HasProductGeneric[T] extends Serializable
  61. type Id[+T] = T
  62. trait InferProduct[C <: Coproduct, K] extends Serializable
  63. final case class Inl[+H, +T <: Coproduct](head: H) extends :+:[H, T] with Product with Serializable

    H :+: T can either be H or T.

    H :+: T can either be H or T. In this case it is H.

  64. final case class Inr[+H, +T <: Coproduct](tail: T) extends :+:[H, T] with Product with Serializable

    H :+: T can either be H or T.

    H :+: T can either be H or T. In this case it is T.

  65. trait IsCCons1[L[_], FH[_[_]], FT[_[_]]] extends Serializable
  66. trait IsCCons10 extends AnyRef
  67. class IsCCons1Macros extends IsCons1Macros
    Annotations
    @bundle()
  68. trait IsCons1Macros extends CaseClassMacros
    Annotations
    @bundle()
  69. trait IsDistinctConstraint[L <: HList] extends Serializable

    Type class witnessing that all elements of L have distinct types

    Type class witnessing that all elements of L have distinct types

    Annotations
    @implicitNotFound("Implicit not found: shapeless.IsDistinctConstraint[${L}]. Some elements have the same type.")
  70. trait IsHCons1[L[_], FH[_[_]], FT[_[_]]] extends Serializable
  71. trait IsHCons10 extends AnyRef
  72. class IsHCons1Macros extends IsCons1Macros
    Annotations
    @bundle()
  73. class IsTuple[T] extends Serializable
  74. trait KeyConstraint[L <: HList, M <: HList] extends Serializable

    Type class witnessing that every element of L is of the form FieldType[K, V] where K is an element of M.

  75. trait LPLens[S, A] extends Dynamic with Serializable
  76. trait LPPath[T <: HList] extends Dynamic
  77. trait LPPrism[S, A] extends Dynamic with Serializable
  78. trait LUBConstraint[L <: HList, B] extends Serializable

    Type class witnessing that every element of L is a subtype of B.

  79. trait LabelledGeneric[T] extends Serializable

    LabelledGeneric is similar to Generic, but includes information about field names or class names in addition to the raw structure.

    LabelledGeneric is similar to Generic, but includes information about field names or class names in addition to the raw structure.

    Continuing the example from shapeless.Generic, we use LabelledGeneric to convert an object to an shapeless.HList:

    scala> val lgenDog = LabelledGeneric[Dog]
    lgenDog: shapeless.LabelledGeneric[Dog]{ type Repr = Record.`'name -> String, 'bonesHidden -> Int`.T } = ...
    
    scala> lgenDog.to(odie)
    res15: lgenDog.Repr = odie :: 3 :: HNil

    Note that the representation does not include the labels! The labels are actually encoded in the generic type representation using shapeless.Witness types.

    As with shapeless.Generic, the representation for Animal captures the subclass embedding rather than the fields in the class, using shapeless.Coproduct:

    scala> val lgenAnimal = LabelledGeneric[Animal]
    lgenAnimal: shapeless.LabelledGeneric[Animal]{ type Repr = Union.`'Cat -> Cat, 'Dog -> Dog`.T } = ...
    
    scala> lgenAnimal.to(odie)
    res16: lgenAnimal.Repr = Dog(odie,3)
    
    scala> genAnimal.to(odie) match { case Inr(Inl(dog)) => dog ; case _ => ???}
    res19: Dog = Dog(odie,3)
    T

    the type which this instance can convert to and from a labelled generic representation

  80. class LabelledMacros extends SingletonTypeUtils with CaseClassMacros
    Annotations
    @bundle()
  81. trait LabelledProductTypeClass[C[_]] extends Serializable

    A type class abstracting over the product operation of type classes over types of kind *, as well as deriving instances using an isomorphism.

    A type class abstracting over the product operation of type classes over types of kind *, as well as deriving instances using an isomorphism. Refines ProductTypeClass with the addition of runtime String labels corresponding to the names of the product elements.

  82. trait LabelledProductTypeClassCompanion[C[_]] extends Serializable
  83. trait LabelledTypeClass[C[_]] extends LabelledProductTypeClass[C]

    A type class additionally abstracting over the coproduct operation of type classes over types of kind *.

    A type class additionally abstracting over the coproduct operation of type classes over types of kind *.

    Name hints can be safely ignored.

  84. trait LabelledTypeClassCompanion[C[_]] extends LabelledProductTypeClassCompanion[C]
  85. trait Lazy[+T] extends Serializable

    Wraps a lazily computed value.

    Wraps a lazily computed value. Also circumvents cycles during implicit search, or wrong implicit divergences as illustrated below, and holds the corresponding implicit value lazily.

    The following implicit search sometimes fails to compile, because of a wrongly reported implicit divergence,

    case class ListCC(list: List[CC])
    case class CC(i: Int, s: String)
    
    trait TC[T]
    
    object TC {
      implicit def intTC: TC[Int] = ???
      implicit def stringTC: TC[String] = ???
      implicit def listTC[T](implicit underlying: TC[T]): TC[List[T]] = ???
    
      implicit def genericTC[F, G](implicit
        gen: Generic.Aux[F, G],
        underlying: TC[G]
      ): TC[F] = ???
    
      implicit def hnilTC: TC[HNil] = ???
    
      implicit def hconsTC[H, T <: HList](implicit
        headTC: TC[H],
        tailTC: TC[T]
      ): TC[H :: T] = ???
    }
    
    implicitly[TC[ListCC]] // fails with: diverging implicit expansion for type TC[ListCC]

    This wrongly reported implicit divergence can be circumvented by wrapping some of the implicit values in Lazy,

    case class ListCC(list: List[CC])
    case class CC(i: Int, s: String)
    
    trait TC[T]
    
    object TC {
      implicit def intTC: TC[Int] = ???
      implicit def stringTC: TC[String] = ???
      implicit def listTC[T](implicit underlying: TC[T]): TC[List[T]] = ???
    
      implicit def genericTC[F, G](implicit
        gen: Generic.Aux[F, G],
        underlying: Lazy[TC[G]] // wrapped in Lazy
      ): TC[F] = ???
    
      implicit def hnilTC: TC[HNil] = ???
    
      implicit def hconsTC[H, T <: HList](implicit
        headTC: Lazy[TC[H]], // wrapped in Lazy
        tailTC: TC[T]
      ): TC[H :: T] = ???
    }
    
    implicitly[TC[ListCC]]

    When looking for an implicit Lazy[TC[T]], the Lazy.mkLazy macro will itself trigger the implicit search for a TC[T]. If this search itself triggers searches for types wrapped in Lazy, these will be done only once, their result put in a lazy val, and a reference to this lazy val will be returned as the corresponding value. It will then wrap all the resulting values together, and return a reference to the first one.

    E.g. with the above example definitions, when looking up for an implicit TC[ListCC], the returned tree roughly looks like

    TC.genericTC(
      Generic[ListCC], // actually, the tree returned by Generic.materialize, not written here for the sake of brevity
      Lazy {
        lazy val impl1: TC[List[CC] :: HNil] = TC.hconsTC(
          Lazy(impl2),
          TC.hnilTC
        )
        lazy val impl2: TC[List[CC]] = TC.listTC(TC.genericTC(
          Generic[CC], // actually, the tree returned by Generic.materialize
          Lazy(impl1)  // cycles to the initial TC[List[CC] :: HNil]
        ))
    
        impl1
      }
    )
    Annotations
    @implicitNotFound("could not find Lazy implicit value of type ${T}")
  86. class LazyMacros extends CaseClassMacros with OpenImplicitMacros with LowPriorityTypes
    Annotations
    @bundle()
  87. trait LazyMacrosCompat extends AnyRef
  88. class LazyMacrosRef extends AnyRef
  89. trait Lens[S, A] extends LPLens[S, A]
  90. sealed trait LowPriority extends Serializable

    Evidence that no implicit instance of the same type as the one being currently searched is available elsewhere.

    Evidence that no implicit instance of the same type as the one being currently searched is available elsewhere.

    Added to an implicit def like

    implicit def genericThing[F, G]
     (implicit
       ev: LowPriority,
       gen: Generic.Aux[F, G],
       underlying: Thing[G]
     ): Thing[F] = ???

    it prevents genericThing to provide an instance of Thing[F] if an implicit one is already available elsewhere. This effectively gives genericThing a lower priority than the already existing implicits - without having to deal with cumbersome priority scoping.

  91. class LowPriorityMacros extends OpenImplicitMacros with LowPriorityTypes
    Annotations
    @bundle()
  92. trait LowPriorityMkPathOptic extends AnyRef
  93. trait LowPriorityMkSelectDynamicOptic extends AnyRef
  94. trait LowPrioritySegment extends AnyRef
  95. trait LowPrioritySized extends AnyRef
  96. trait LowPriorityTypeable extends AnyRef
  97. trait LowPriorityTypes extends AnyRef
    Annotations
    @bundle()
  98. trait LowPriorityUnaryTCConstraint extends LowPriorityUnaryTCConstraint0
  99. trait LowPriorityUnaryTCConstraint0 extends AnyRef
  100. trait LowPriorityUnwrappedInstances extends AnyRef
  101. trait LowPriorityWitnessWith extends AnyRef
  102. trait Lub[-A, -B, Out] extends Serializable

    Type class witnessing the least upper bound of a pair of types and providing conversions from each to their common supertype.

  103. trait MkCoproductSelectPrism[C <: Coproduct, T] extends Serializable
  104. trait MkCtorPrism[A, B] extends Serializable
  105. trait MkFieldLens[A, K] extends Serializable
  106. trait MkGenericLens[T] extends Serializable
  107. trait MkHListNthLens[L <: HList, N <: Nat] extends Serializable
  108. trait MkHListSelectLens[L <: HList, U] extends Serializable
  109. trait MkLabelledGenericLens[T] extends Serializable
  110. trait MkNthFieldLens[A, N <: Nat] extends Serializable
  111. trait MkPathOptic[S, P <: HList] extends Serializable
  112. trait MkRecordSelectLens[R <: HList, K] extends Serializable
  113. trait MkSelectDynamicOptic[R, A, K, B] extends Serializable
  114. trait Nat extends AnyRef

    Base trait for type level natural numbers.

  115. trait NatMacroDefns extends AnyRef
    Annotations
    @bundle()
  116. class NatMacros extends NatMacroDefns
    Annotations
    @bundle()
  117. trait NatProductArgs extends Dynamic

    Trait supporting mapping dynamic argument lists of Ints to HList of Nat arguments.

    Trait supporting mapping dynamic argument lists of Ints to HList of Nat arguments.

    Mixing in this trait enables method applications of the form,

    lhs.method(1, 2, 3)

    to be rewritten as,

    lhs.methodProduct(_1 :: _2 :: _3)

    ie. the arguments are rewritten as HList elements of Nat and the application is rewritten to an application of an implementing method (identified by the "Product" suffix) which accepts a single HList of Int argument.

  118. trait NatTRel0 extends AnyRef
  119. trait NatWith[TC[_ <: Nat]] extends AnyRef
  120. trait Nats extends AnyRef
  121. trait NotContainsConstraint[L <: HList, U] extends Serializable

    Type class witnessing that L doesn't contain elements of type U

    Type class witnessing that L doesn't contain elements of type U

    Annotations
    @implicitNotFound("Implicit not found: shapeless.NotContainsConstraint[${L}, ${U}]. This HList already contains element of type ${U}.")
  122. trait OpenImplicitMacros extends AnyRef
    Annotations
    @bundle()
  123. trait OpticComposer[L, R] extends Serializable
  124. sealed trait OrElse[+A, +B] extends AnyRef

    Like Option.orElse on the type level and like Either on the value level.

    Like Option.orElse on the type level and like Either on the value level.

    Instead of left and right constructors OrElse has primary and secondary implicits that lazily try to resolve first a value of type A or otherwise a value of type B.

  125. case class Orphan[F[_], D, T](instance: F[T]) extends Product with Serializable
  126. trait OrphanDeriver[F[_], D] extends AnyRef
  127. class OrphanMacros extends CaseClassMacros
    Annotations
    @bundle()
  128. trait Path[T <: HList] extends LPPath[T]
  129. trait Poly extends PolyApply with Serializable

    Base trait for polymorphic values.

  130. trait Poly0 extends Poly

    Trait simplifying the creation of polymorphic values.

  131. trait Poly1 extends Poly
  132. trait Poly10 extends Poly
  133. trait Poly11 extends Poly
  134. trait Poly12 extends Poly
  135. trait Poly13 extends Poly
  136. trait Poly14 extends Poly
  137. trait Poly15 extends Poly
  138. trait Poly16 extends Poly
  139. trait Poly17 extends Poly
  140. trait Poly18 extends Poly
  141. trait Poly19 extends Poly
  142. trait Poly2 extends Poly
  143. trait Poly20 extends Poly
  144. trait Poly21 extends Poly
  145. trait Poly22 extends Poly
  146. trait Poly3 extends Poly
  147. trait Poly4 extends Poly
  148. trait Poly5 extends Poly
  149. trait Poly6 extends Poly
  150. trait Poly7 extends Poly
  151. trait Poly8 extends Poly
  152. trait Poly9 extends Poly
  153. trait PolyApply extends AnyRef
  154. trait PolyInst extends AnyRef
  155. class PolyMacros extends AnyRef
    Annotations
    @bundle()
  156. trait PolymorphicEqualityFacet extends ProductISOFacet
  157. final class Primary[+A] extends OrElse[A, Nothing]
  158. trait Prism[S, A] extends LPPrism[S, A]
  159. trait ProductArgs extends Dynamic

    Trait supporting mapping dynamic argument lists to HList arguments.

    Trait supporting mapping dynamic argument lists to HList arguments.

    Mixing in this trait enables method applications of the form,

    lhs.method(23, "foo", true)

    to be rewritten as,

    lhs.methodProduct(23 :: "foo" :: true)

    ie. the arguments are rewritten as HList elements and the application is rewritten to an application of an implementing method (identified by the "Product" suffix) which accepts a single HList argument.

  160. trait ProductFacet extends ProductISOFacet
  161. trait ProductISOFacet extends CaseClassFacet
  162. trait ProductLensBuilder[C, P <: Product] extends Lens[C, P] with Serializable
  163. class ProductMacros extends SingletonTypeUtils with NatMacroDefns
    Annotations
    @bundle()
  164. trait ProductPrismBuilder[C, P <: Product] extends Prism[C, P] with Serializable
  165. trait ProductTypeClass[C[_]] extends Serializable

    A type class abstracting over the product operation of type classes over types of kind *, as well as deriving instances using an isomorphism.

  166. trait ProductTypeClassCompanion[C[_]] extends Serializable
  167. trait RecordArgs extends Dynamic

    Trait supporting mapping named argument lists to record arguments.

    Trait supporting mapping named argument lists to record arguments.

    Mixing in this trait enables method applications of the form,

    lhs.method(x = 23, y = "foo", z = true)

    to be rewritten as,

    lhs.methodRecord('x ->> 23 :: 'y ->> "foo", 'z ->> true)

    ie. the named arguments are rewritten as record fields with the argument name encoded as a singleton-typed Symbol and the application is rewritten to an application of an implementing method (identified by the "Record" suffix) which accepts a single record argument.

  168. class RecordMacros extends AnyRef
    Annotations
    @bundle()
  169. trait Refute[T] extends AnyRef

    Evidence that no implicit instance of type T is available

  170. trait ReprTypes extends AnyRef
    Annotations
    @bundle()
  171. trait ScalaVersionSpecifics extends AnyRef
  172. final class Secondary[+B] extends OrElse[Nothing, B]
  173. trait Segment[P, S, T <: HList] extends AnyRef
  174. trait Select[T] extends AnyRef
  175. trait SingletonProductArgs extends Dynamic

    Trait supporting mapping dynamic argument lists to singleton-typed HList arguments.

    Trait supporting mapping dynamic argument lists to singleton-typed HList arguments.

    Mixing in this trait enables method applications of the form,

    lhs.method(23, "foo", true)

    to be rewritten as,

    lhs.methodProduct(23.narrow :: "foo".narrow :: true.narrow)

    ie. the arguments are rewritten as singleton-typed HList elements and the application is rewritten to an application of an implementing method (identified by the "Product" suffix) which accepts a single HList argument.

  176. class SingletonTypeMacros extends SingletonTypeUtils with NatMacroDefns
    Annotations
    @bundle()
  177. trait SingletonTypeUtils extends ReprTypes
    Annotations
    @bundle()
  178. final class Sized[+Repr, L <: Nat] extends AnyRef

    Wrapper for a collection type witnessing that it has the statically specified length.

    Wrapper for a collection type witnessing that it has the statically specified length. Can be applied to any type which can be viewed as an IterableOps, ie. standard collections, Arrays, Strings etc.

  179. class SizedBuilder[CC[_]] extends AnyRef
  180. class SizedOps[A0, Repr, L <: Nat] extends AnyRef

    Carrier for Sized operations.

    Carrier for Sized operations.

    These operations are implemented here as extension methods of the minimal Sized type to avoid issues that would otherwise be caused by its covariance.

  181. trait Split1[L[_], FO[_[_]], FI[_[_]]] extends Serializable
  182. trait Split10 extends AnyRef
  183. class Split1Macros extends CaseClassMacros
    Annotations
    @bundle()
  184. trait Strict[+T] extends Serializable

    Wraps an eagerly computed value.

    Wraps an eagerly computed value. Prevents wrongly reported implicit divergence, like Lazy does, but, unlike it, does not circumvent implicit cycles.

    Creation of Lazy instances usually triggers the creation of an anonymous class, to compute the wrapped value (e.g. with the by-name argument of Lazy.apply). Strict avoids that, which can lead to less overhead during compilation.

  185. case class Succ[P <: Nat]() extends Nat with Product with Serializable

    Encoding of successor.

  186. class TestMacros extends AnyRef
    Annotations
    @bundle()
  187. class TheMacros extends AnyRef
    Annotations
    @bundle()
  188. trait ToStringFacet extends ProductFacet
  189. trait TupleTypeableInstances extends AnyRef
  190. trait TypeCase[T] extends Serializable

    Extractor for use of Typeable in pattern matching.

    Extractor for use of Typeable in pattern matching.

    Thanks to Stacy Curl for the idea.

  191. trait TypeClass[C[_]] extends ProductTypeClass[C]

    A type class additionally abstracting over the coproduct operation of type classes over types of kind *.

  192. trait TypeClassCompanion[C[_]] extends ProductTypeClassCompanion[C]
  193. trait Typeable[T] extends Serializable

    Type class supporting type safe cast.

  194. class TypeableMacros extends SingletonTypeUtils
    Annotations
    @bundle()
  195. trait UnaryTCConstraint[L <: HList, TC[_]] extends Serializable

    Type class witnessing that every element of L has TC as its outer type constructor.

  196. class UnionMacros extends AnyRef
    Annotations
    @bundle()
  197. trait Unpack1[-PP, FF[_], A] extends AnyRef

    Type class witnessing that type PP is equal to FF[A] for some higher kinded type FF[_] and type(s) A.

  198. trait Unpack10[-PP, FF[_, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J.

  199. trait Unpack11[-PP, FF[_, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K.

  200. trait Unpack12[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L.

  201. trait Unpack13[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M.

  202. trait Unpack14[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N.

  203. trait Unpack15[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O.

  204. trait Unpack16[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P.

  205. trait Unpack17[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q.

  206. trait Unpack18[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R.

  207. trait Unpack19[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S.

  208. trait Unpack2[-PP, FF[_, _], A, B] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B] for some higher kinded type FF[_, _] and type(s) A, B.

  209. trait Unpack20[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T.

  210. trait Unpack21[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U.

  211. trait Unpack22[-PP, FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] for some higher kinded type FF[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V.

  212. trait Unpack3[-PP, FF[_, _, _], A, B, C] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C] for some higher kinded type FF[_, _, _] and type(s) A, B, C.

  213. trait Unpack4[-PP, FF[_, _, _, _], A, B, C, D] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D] for some higher kinded type FF[_, _, _, _] and type(s) A, B, C, D.

  214. trait Unpack5[-PP, FF[_, _, _, _, _], A, B, C, D, E] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E] for some higher kinded type FF[_, _, _, _, _] and type(s) A, B, C, D, E.

  215. trait Unpack6[-PP, FF[_, _, _, _, _, _], A, B, C, D, E, F] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F] for some higher kinded type FF[_, _, _, _, _, _] and type(s) A, B, C, D, E, F.

  216. trait Unpack7[-PP, FF[_, _, _, _, _, _, _], A, B, C, D, E, F, G] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G] for some higher kinded type FF[_, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G.

  217. trait Unpack8[-PP, FF[_, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H] for some higher kinded type FF[_, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H.

  218. trait Unpack9[-PP, FF[_, _, _, _, _, _, _, _, _], A, B, C, D, E, F, G, H, I] extends AnyRef

    Type class witnessing that type PP is equal to FF[A, B, C, D, E, F, G, H, I] for some higher kinded type FF[_, _, _, _, _, _, _, _, _] and type(s) A, B, C, D, E, F, G, H, I.

  219. trait Unwrapped[W] extends Serializable
  220. trait UnwrappedInstances extends LowPriorityUnwrappedInstances
  221. trait ValueConstraint[L <: HList, M <: HList] extends Serializable

    Type class witnessing that every element of L is of the form FieldType[K, V] where V is an element of M.

  222. trait Widen[T] extends DepFn1[T]

    Provides the widen type of a singleton type.

    Provides the widen type of a singleton type.

    Type member Out of an implicitly available Witness[T] instance is the widen type of T, and the apply method explicitly converts a T to an Out.

    E.g. if T is Witness.2.T, Out is Int.

    It somehow complements Witness, providing the corresponding non-witnessed standard type, if any.

    Example of use, {{ val w = Widen[Witness.2.T] // w.Out is Int // w(2) is typed as Int }}

  223. trait Witness extends Serializable

    Provides the value corresponding to a singleton type.

    Provides the value corresponding to a singleton type.

    See SIP-23 for a related proposed language change.

  224. trait WitnessWith[TC[_]] extends Witness
  225. case class WrappedOrphan[T](instance: T) extends Product with Serializable
  226. case class Zipper[C, L <: HList, R <: HList, P](prefix: L, suffix: R, parent: P) extends Product with Serializable

    Generic Zipper for any type with a representation via Generic.

  227. class _0 extends Nat with Serializable

    Encoding of zero.

  228. class nonGeneric extends scala.annotation.Annotation with StaticAnnotation
  229. type |¬|[T] = AnyRef { type λ[U] = U <:!< T }
  230. type |∨|[T, U] = AnyRef { type λ[X] = shapeless.package.¬¬[X] <:< (T ∨ U) }
  231. class ~?>[K[_], V[_]] extends Serializable

    Type class witnessing the existence of a natural transformation between K[_] and V[_].

    Type class witnessing the existence of a natural transformation between K[_] and V[_].

    Use this trait to represent an HMap relation of the form K[T] maps to V[T].

  232. type ¬[T] = (T) => Nothing
  233. type ¬¬[T] = (¬[T]) => Nothing
  234. type [P[_]] = ([[X](P[X]) => Nothing]) => Nothing
  235. type [P[_]] = P[_]
  236. type [T, U] = T with U
  237. type [T, U] = ([¬[T], ¬[U]]) => Nothing

Value Members

  1. val ^: Path.type
  2. macro def cachedImplicit[T]: T
  3. def everything(f: Poly): ApplyEverything[f.type]
  4. def everywhere(f: Poly): EverywhereAux[f.type]
  5. val fin: Fin.type

    'Fin'

  6. val lens: OpticDefns.type
  7. val nat: Nat.type

    Nat literals

  8. implicit def neq[A, B]: =:!=[A, B]
  9. implicit def neqAmbig1[A]: =:!=[A, A]
  10. implicit def neqAmbig2[A]: =:!=[A, A]
  11. implicit def nsub[A, B]: <:!<[A, B]
  12. implicit def nsubAmbig1[A, B >: A]: <:!<[A, B]
  13. implicit def nsubAmbig2[A, B >: A]: <:!<[A, B]
  14. val optic: OpticDefns.type

    Optic definitions

  15. val poly: PolyDefns.type

    Poly definitions

  16. val prism: OpticDefns.type
  17. def unexpected: Nothing
  18. object AdditiveCollection extends Serializable
  19. object Annotation extends Serializable
  20. object Annotations extends Serializable
  21. object BasisConstraint extends Serializable
  22. object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  23. object Cached extends Serializable
  24. object CachedMacros
  25. object Coproduct extends Dynamic with Serializable
  26. object Data extends Data1 with Serializable
  27. object DataT extends DataT1 with Serializable
  28. object Default extends Serializable
  29. object DefaultSymbolicLabelling extends Serializable
  30. object DefaultToIndexedSeq
  31. object EverythingAux extends Serializable
  32. object EverywhereAux extends Serializable
  33. object Fin
  34. object Generic extends Serializable

    The companion object for the Generic trait provides a way of obtaining a Generic[T] instance for some T.

    The companion object for the Generic trait provides a way of obtaining a Generic[T] instance for some T. In addition, it defines Generic.Aux, which is an important implementation technique that can be generally useful.

  35. object Generic1 extends Generic10 with Serializable
  36. object HList extends Dynamic with Serializable
  37. object HMap extends Serializable
  38. object HNil extends HNil with Product with Serializable

    Empty HList value.

  39. object HasCoproductGeneric extends Serializable
  40. object HasProductGeneric extends Serializable
  41. object InferProduct extends Serializable
  42. object IsCCons1 extends IsCCons10 with Serializable
  43. object IsDistinctConstraint extends Serializable
  44. object IsHCons1 extends IsHCons10 with Serializable
  45. object IsTuple extends Serializable
  46. object KeyConstraint extends Serializable
  47. object LUBConstraint extends Serializable
  48. object LabelledGeneric extends Serializable
  49. object Lazy extends Serializable
  50. object LazyMacros extends LazyMacrosCompat
  51. object LowPriority extends Serializable
  52. object Lub extends Serializable
  53. object MkCoproductSelectPrism extends Serializable
  54. object MkCtorPrism extends Serializable
  55. object MkFieldLens extends Serializable
  56. object MkGenericLens extends Serializable
  57. object MkHListNthLens extends Serializable
  58. object MkHListSelectLens extends Serializable
  59. object MkLabelledGenericLens extends Serializable
  60. object MkNthFieldLens extends Serializable
  61. object MkPathOptic extends LowPriorityMkPathOptic with Serializable
  62. object MkRecordSelectLens extends Serializable
  63. object MkSelectDynamicOptic extends LowPriorityMkSelectDynamicOptic with Serializable
  64. object Nat extends Nats

    Type level encoding of the natural numbers.

  65. object NatWith
  66. object NotContainsConstraint extends Serializable
  67. object OpticComposer extends Serializable
  68. object OpticDefns
  69. object OrElse extends OrElse0
  70. object Orphan extends Serializable
  71. object Path extends Path[HNil]
  72. object Poly extends PolyInst with Serializable

    Provides implicit conversions from polymorphic function values to monomorphic function values, eg.

    Provides implicit conversions from polymorphic function values to monomorphic function values, eg. for use as arguments to ordinary higher order functions.

  73. object Poly1 extends Poly1Builder[HNil] with Serializable
  74. object Poly10 extends Poly10Builder[HNil] with Serializable
  75. object Poly11 extends Poly11Builder[HNil] with Serializable
  76. object Poly12 extends Poly12Builder[HNil] with Serializable
  77. object Poly13 extends Poly13Builder[HNil] with Serializable
  78. object Poly14 extends Poly14Builder[HNil] with Serializable
  79. object Poly15 extends Poly15Builder[HNil] with Serializable
  80. object Poly16 extends Poly16Builder[HNil] with Serializable
  81. object Poly17 extends Poly17Builder[HNil] with Serializable
  82. object Poly18 extends Poly18Builder[HNil] with Serializable
  83. object Poly19 extends Poly19Builder[HNil] with Serializable
  84. object Poly2 extends Poly2Builder[HNil] with Serializable
  85. object Poly20 extends Poly20Builder[HNil] with Serializable
  86. object Poly21 extends Poly21Builder[HNil] with Serializable
  87. object Poly22 extends Poly22Builder[HNil] with Serializable
  88. object Poly3 extends Poly3Builder[HNil] with Serializable
  89. object Poly4 extends Poly4Builder[HNil] with Serializable
  90. object Poly5 extends Poly5Builder[HNil] with Serializable
  91. object Poly6 extends Poly6Builder[HNil] with Serializable
  92. object Poly7 extends Poly7Builder[HNil] with Serializable
  93. object Poly8 extends Poly8Builder[HNil] with Serializable
  94. object Poly9 extends Poly9Builder[HNil] with Serializable
  95. object PolyDefns extends Cases
  96. object PolyNBuilders

    Provides elegant syntax for creating polys from functions

  97. object Refute
  98. object Segment extends LowPrioritySegment
  99. object Sized extends LowPrioritySized
  100. object Split1 extends Split10 with Serializable
  101. object Strict extends Serializable
  102. object Tuple
  103. object TypeCase extends Serializable
  104. object TypeOf extends Dynamic
  105. object Typeable extends TupleTypeableInstances with LowPriorityTypeable with Serializable

    Provides instances of Typeable.

    Provides instances of Typeable. Also provides an implicit conversion which enhances arbitrary values with a cast[T] method.

  106. object UnaryTCConstraint extends LowPriorityUnaryTCConstraint with Serializable
  107. object Unpack1
  108. object Unpack10
  109. object Unpack11
  110. object Unpack12
  111. object Unpack13
  112. object Unpack14
  113. object Unpack15
  114. object Unpack16
  115. object Unpack17
  116. object Unpack18
  117. object Unpack19
  118. object Unpack2
  119. object Unpack20
  120. object Unpack21
  121. object Unpack22
  122. object Unpack3
  123. object Unpack4
  124. object Unpack5
  125. object Unpack6
  126. object Unpack7
  127. object Unpack8
  128. object Unpack9
  129. object Unwrapped extends UnwrappedInstances with Serializable
  130. object ValueConstraint extends Serializable
  131. object Widen
  132. object Witness extends Dynamic with Serializable
  133. object WitnessWith extends LowPriorityWitnessWith with Serializable
  134. object WrappedOrphan extends Serializable
  135. object Zipper extends Serializable
  136. object labelled
  137. object lazily
  138. object newtype
  139. object productElements extends Poly1

    Higher ranked function which converts products to HLists.

  140. object record

    Record operations on HList's with field-like elements.

  141. object tag
  142. object the extends Dynamic

    An enhanced alternative to Predef.implicitly.

    An enhanced alternative to Predef.implicitly.

    Used as a term the[T] yields the unique implicit value of type T in the current implicit scope, if any. It is a compile time error if there is no such value. Its primary advantage over Predef.implicitly is that it will preserve any refinement that the implicit definition has, resulting in more precisely typed, and hence often more useful, values,

    scala> trait Foo { type T ; val t: T }
    defined trait Foo
    
    scala> implicit val intFoo: Foo { type T = Int } = new Foo { type T = Int ; val t = 23 }
    intFoo: Foo{type T = Int} = $anon$1@6067b682
    
    scala> implicitly[Foo].t  // implicitly loses precision
    res0: Foo#T = 23
    
    scala> implicitly[Foo].t+13
    <console>:13: error: type mismatch;
     found   : Int(13)
     required: String
                  implicitly[Foo].t+13
                                    ^
    
    scala> the[Foo].t         // the retains it
    res1: Int = 23
    
    scala> the[Foo].t+13
    res2: Int = 36

    Unlike implicitly, the can also be used in type position, thanks to a trick due to Denys Shabalin (@den_sh) and Eugene Burmako (@xeno_by). Here we use a combination of selectDynamic and backticks to embed a type in a path which appears to the compiler as stable,

    scala> val i: implicitly[Foo].T = 23  // syntax error
    <console>:1: error: ';' expected but '.' found.
           val i: implicitly[Foo].T = 23
                                 ^
    scala> val i: the.`Foo`.T = 23        // OK
    i: Int = 23
  143. object tupled extends Poly1

    Higher ranked function which converts HLists to tuples.

  144. object union
  145. object ~?> extends NatTRel0 with Serializable

Inherited from ScalaVersionSpecifics

Inherited from AnyRef

Inherited from Any

Ungrouped