Packages

p

scalaz

typelevel

package typelevel

Type-level data structures in Scalaz.

This package contains:

  • heterogeneous lists
  • type-level natural numbers
  • type-safe port of Java's printf

In general, including scalaz.typelevel._ should be enough.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. typelevel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Format[T, R] extends AnyRef
  2. trait Formatter[Params <: HList, R] extends (Params) ⇒ R
  3. trait Formatters extends AnyRef
  4. trait Func[F[_], TC[F[_]] <: Functor[F[_]], A, B] extends AnyRef

    Represents a function A => F[B] where [F: TC].

    Represents a function A => F[B] where [F: TC].

    Contributed by Eugene Yokota.

  5. trait FuncFunctions extends AnyRef
  6. trait FuncInstances extends FuncInstances1
  7. trait FuncInstances1 extends FuncInstances2
  8. trait FuncInstances2 extends FuncInstances3
  9. trait FuncInstances3 extends AnyRef
  10. case class GenericCons[M[_], H, +T <: GenericList[M]](head: M[H], tail: T) extends GenericList[M] with Product with Serializable

  11. sealed trait GenericList[+M[_]] extends AnyRef

    A list which preserves the precise types of all elements.

    A list which preserves the precise types of all elements. It can be seen as a generalized tuple of arbitrary arity.

    This structure allows to store values of different types together and supports some basic operations like appending, folding or mapping via a scalaz.NaturalTransformation. It also serves as a replacement for scalaz.syntax.ApplicativeBuilder.

    All elements have to share a common type constructor, e.g. scala.List or scala.Option. This makes easy use with scalaz.Applicative possible. If the types of the elements are not in appropriate shape, use scalaz.Id.

    Because this trait is covariant in M, most methods have an additional type parameter N which is usually inferred to be equal to M. However, it is still possible to prepend a value of type Option[A] to a list with the type constructor Some.

    M

    The common type constructor of all elements.

    See also

    scalaz.typelevel.HList

  12. case class GenericNil[M[_]]() extends GenericList[M] with Product with Serializable

  13. type HCons[H, T <: HList] = GenericCons[Id.Id, H, T]

    Note

    :: as type and extractor is available in scalaz.syntax.typelevel.HLists

  14. case class HConsFunc[F[_], TC[F[_]] <: Functor[F[_]], A, B, +T <: HListFunc[TC, A, B]](head: Func[F, TC, A, B], tail: T) extends HListFunc[TC, A, B] with Product with Serializable
  15. trait HFold[M[_], U] extends AnyRef
  16. type HList = GenericList[Id.Id]

    A scalaz.typelevel.GenericList with the type constructor scalaz.Id

  17. trait HListFunc[TC[X[_]] <: Functor[X[_]], A, B] extends AnyRef

    Represents a function A => T#Product[B] where [L <: TCList].

    Represents a function A => T#Product[B] where [L <: TCList].

    Example:

    import scalaz._, std.AllInstances._, typelevel._, Func._
    
    val list = AppFuncU { (x: Int) => x + 1 } :: AppFuncU { (x: Int) => List(x + 5) } :: AppFunc.HNil
    list.traverse(List(1, 2, 3))
  18. type HNil = GenericNil[Id.Id]
  19. case class HNilFunc[TC[F[_]] <: Functor[F[_]], A, B](TC0: KTypeClass[TC]) extends HListFunc[TC, A, B] with Product with Serializable
  20. trait HStream[T[_ <: Nat]] extends AbstractHStream

    An infinite sequence of elements with different types.

  21. type KCons[M[_], H, +T <: KList[M]] = GenericCons[M, H, T]
  22. type KList[M[_]] = GenericList[M]

    Alias for scalaz.typelevel.KList

  23. type KNil[M[_]] = GenericNil[M]
  24. trait KTypeClass[C[_[_]]] extends AnyRef

    A type class abstracting over the product and compose operations of type classes over types of kind * -> *.

    A type class abstracting over the product and compose operations of type classes over types of kind * -> *.

    It serves as a replacement for the various Product* classes in scalaz.

    Multiplication of instances is done via wrappers which are unpacked automatically if the implicits of scalaz.syntax.typelevel.TypeClasses are imported.

    See also

    scalaz.typelevel.TCList

    scalaz.syntax.typelevel.TypeClasses

  25. trait NFold[U] extends AnyRef
  26. sealed trait Nat extends AnyRef
  27. trait Nats extends AnyRef
  28. class SimpleUnionFormat[D <: UnionTypes.Disj, R] extends UnionFormat[D, R]
  29. case class Succ[N <: Nat](predecessor: N) extends Nat with Product with Serializable
  30. sealed trait TCCons[M[_], T <: TCList] extends TCList
  31. sealed trait TCList extends AnyRef

    A structure storing a list of type constructors in the type, providing type conversions for composition and products.

    A structure storing a list of type constructors in the type, providing type conversions for composition and products.

    Note

    There are no values of this type.

    See also

    scalaz.typelevel.TypeClass

  32. sealed trait TCNil extends TCList
  33. trait UnionFormat[D <: UnionTypes.Disj, R] extends Format[UnionTypes.Union[D], R]
  34. type UpperConstrained[T[_], U] = AnyRef { type Apply[X <: U] = T[X] }

    Constraining a type constructor to a certain upper bound

Value Members

  1. val :^:: GenericCons.type
  2. def FNil[R](implicit arg0: Monoid[R]): Formatter[HNil, R]

    The empty scalaz.typelevel.Formatter.

  3. lazy val HNil: HNil
  4. val KNil: _KNil.type
  5. implicit def mkIdOps[T <: HList](list: T): IdOps[T]
  6. object AppFunc
  7. object AppFuncU
  8. object ApplyFunc
  9. object ApplyFuncU
  10. object Format
  11. object Formatter extends Formatters
  12. object Func extends FuncFunctions with FuncInstances
  13. object FunctorFunc
  14. object FunctorFuncU
  15. object GenericList
  16. object HCons extends Serializable
  17. object HFold
  18. object HListFunc
  19. object HLists
  20. object HStream
  21. object KTypeClass
  22. object NFold
  23. object Nats extends Nats
  24. object Typelevel extends AllSyntaxes with Nats
  25. object Zero extends Nat with Product with Serializable
  26. object _KNil extends KNil[Nothing]

Inherited from AnyRef

Inherited from Any

Ungrouped