Package

cats

data

Permalink

package data

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. data
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class AppFunc[F[_], A, B] extends Func[F, A, B]

    Permalink

    An implementation of Func that's specialized to Applicative.

  2. final case class Cokleisli[F[_], A, B](run: (F[A]) ⇒ B) extends Product with Serializable

    Permalink

    Represents a function F[A] => B.

  3. final case class Const[A, B](getConst: A) extends Product with Serializable

    Permalink

    Const is a phantom type, it does not contain a value of its second type parameter B Const can be seen as a type level version of Function.const[A, B]: A => B => A

  4. final case class Coproduct[F[_], G[_], A](run: Xor[F[A], G[A]]) extends Product with Serializable

    Permalink

    F on the left and G on the right of Xor.

    F on the left and G on the right of Xor.

    run

    The underlying Xor.

  5. sealed abstract class CoproductInstances extends CoproductInstances0

    Permalink
  6. sealed abstract class Func[F[_], A, B] extends AnyRef

    Permalink

    Func is a function A => F[B].

    Func is a function A => F[B].

    See: The Essence of the Iterator Pattern

  7. sealed trait FuncApplicative[F[_], C] extends Applicative[[X]Func[F, C, X]] with FuncApply[F, C]

    Permalink
  8. sealed trait FuncApply[F[_], C] extends Apply[[X]Func[F, C, X]] with FuncFunctor[F, C]

    Permalink
  9. sealed trait FuncFunctor[F[_], C] extends Functor[[X]Func[F, C, X]]

    Permalink
  10. sealed abstract class Ior[+A, +B] extends Product with Serializable

    Permalink

    Represents a right-biased disjunction that is either an A, or a B, or both an A and a B.

    Represents a right-biased disjunction that is either an A, or a B, or both an A and a B.

    An instance of A Ior B is one of:

    A Ior B is similar to A Xor B, except that it can represent the simultaneous presence of an A and a B. It is right-biased like Xor, so methods such as map and flatMap operate on the B value. Some methods, like flatMap, handle the presence of two Both values using a Semigroup[A], while other methods, like toXor, ignore the A value in a Both.

    A Ior B is isomorphic to (A Xor B) Xor (A, B), but provides methods biased toward B values, regardless of whether the B values appear in a Right or a Both. The isomorphic Xor form can be accessed via the unwrap method.

  11. sealed trait IorFunctions extends AnyRef

    Permalink
  12. final case class Kleisli[F[_], A, B](run: (A) ⇒ F[B]) extends Product with Serializable

    Permalink

    Represents a function A => F[B].

  13. type NonEmptyList[A] = OneAnd[List, A]

    Permalink
  14. type NonEmptyStream[A] = OneAnd[Stream, A]

    Permalink
  15. type NonEmptyVector[A] = OneAnd[Vector, A]

    Permalink
  16. final case class OneAnd[F[_], A](head: A, tail: F[A]) extends Product with Serializable

    Permalink

    A data type which represents a single element (head) and some other structure (tail).

    A data type which represents a single element (head) and some other structure (tail). As we have done in package.scala, this can be used to represent a List which is guaranteed to not be empty:

    type NonEmptyList[A] = OneAnd[List, A]
  17. trait OneAndLowPriority0 extends AnyRef

    Permalink
  18. trait OneAndLowPriority1 extends OneAndLowPriority0

    Permalink
  19. trait OneAndLowPriority2 extends OneAndLowPriority1

    Permalink
  20. final case class OptionT[F[_], A](value: F[Option[A]]) extends Product with Serializable

    Permalink

    OptionT[F[_], A] is a light wrapper on an F[Option[A]] with some convenient methods for working with this nested structure.

    OptionT[F[_], A] is a light wrapper on an F[Option[A]] with some convenient methods for working with this nested structure.

    It may also be said that OptionT is a monad transformer for Option.

    For more information, see the documentation.

  21. final case class Prod[F[_], G[_], A](first: F[A], second: G[A]) extends Product with Serializable

    Permalink

    Prod is a product to two independent functor values.

    Prod is a product to two independent functor values.

    See: The Essence of the Iterator Pattern

  22. sealed trait ProdAlternative[F[_], G[_]] extends Alternative[[X]Prod[F, G, X]] with ProdApplicative[F, G] with ProdMonoidK[F, G]

    Permalink
  23. sealed trait ProdApplicative[F[_], G[_]] extends Applicative[[X]Prod[F, G, X]] with ProdApply[F, G]

    Permalink
  24. sealed trait ProdApply[F[_], G[_]] extends Apply[[X]Prod[F, G, X]] with ProdFunctor[F, G]

    Permalink
  25. sealed trait ProdFunctor[F[_], G[_]] extends Functor[[X]Prod[F, G, X]]

    Permalink
  26. sealed trait ProdMonoidK[F[_], G[_]] extends MonoidK[[X]Prod[F, G, X]] with ProdSemigroupK[F, G]

    Permalink
  27. sealed trait ProdSemigroupK[F[_], G[_]] extends SemigroupK[[X]Prod[F, G, X]]

    Permalink
  28. type Reader[A, B] = Kleisli[Id, A, B]

    Permalink
  29. type ReaderT[F[_], A, B] = Kleisli[F, A, B]

    Permalink
  30. type State[S, A] = StateT[Eval, S, A]

    Permalink
  31. final class StateT[F[_], S, A] extends Serializable

    Permalink

    StateT[F, S, A] is similar to Kleisli[F, S, A] in that it takes an S argument and produces an A value wrapped in F.

    StateT[F, S, A] is similar to Kleisli[F, S, A] in that it takes an S argument and produces an A value wrapped in F. However, it also produces an S value representing the updated state (which is wrapped in the F context along with the A value.

  32. sealed abstract class Validated[+E, +A] extends Product with Serializable

    Permalink
  33. trait ValidatedFunctions extends AnyRef

    Permalink
  34. type ValidatedNel[E, A] = Validated[NonEmptyList[E], A]

    Permalink
  35. type Writer[L, V] = WriterT[Id, L, V]

    Permalink
  36. final case class WriterT[F[_], L, V](run: F[(L, V)]) extends Product with Serializable

    Permalink
  37. trait WriterTFunctions extends AnyRef

    Permalink
  38. sealed abstract class Xor[+A, +B] extends Product with Serializable

    Permalink

    Represents a right-biased disjunction that is either an A or a B.

    Represents a right-biased disjunction that is either an A or a B.

    An instance of A Xor B is either a Left[A] or a Right[B].

    A common use of Xor is to explicitly represent the possibility of failure in a result as opposed to throwing an exception. By convention, Left is used for errors and Right is reserved for successes. For example, a function that attempts to parse an integer from a string may have a return type of NumberFormatException Xor Int. However, since there is no need to actually throw an exception, the type (A) chosen for the "left" could be any type representing an error and has no need to actually extend Exception.

    A Xor B is isomorphic to scala.Either[A, B], but Xor is right-biased, so methods such as map and flatMap apply only in the context of the "right" case. This right bias makes Xor more convenient to use than scala.Either in a monadic context. Methods such as swap, and leftMap provide functionality that scala.Either exposes through left projections.

  39. trait XorFunctions extends AnyRef

    Permalink
  40. final case class XorT[F[_], A, B](value: F[Xor[A, B]]) extends Product with Serializable

    Permalink

    Transformer for Xor, allowing the effect of an arbitrary type constructor F to be combined with the fail-fast effect of Xor.

    Transformer for Xor, allowing the effect of an arbitrary type constructor F to be combined with the fail-fast effect of Xor.

    XorT[F, A, B] wraps a value of type F[A Xor B]. An F[C] can be lifted in to XorT[F, A, C] via XorT.right, and lifted in to a XorT[F, C, B] via XorT.left.

  41. trait XorTFunctions extends AnyRef

    Permalink

Value Members

  1. object AppFunc extends AppFuncInstances

    Permalink
  2. object Cokleisli extends CokleisliInstances with Serializable

    Permalink
  3. object Const extends ConstInstances with Serializable

    Permalink
  4. object Coproduct extends CoproductInstances with Serializable

    Permalink
  5. object Func extends FuncInstances

    Permalink
  6. object Ior extends IorInstances with IorFunctions with Serializable

    Permalink
  7. object Kleisli extends KleisliInstances with KleisliFunctions with Serializable

    Permalink
  8. def NonEmptyList[A](head: A, tail: A*): NonEmptyList[A]

    Permalink
  9. def NonEmptyList[A](head: A, tail: List[A] = Nil): NonEmptyList[A]

    Permalink
  10. object NonEmptyList extends Serializable

    Permalink
  11. def NonEmptyStream[A](head: A, tail: A*): NonEmptyStream[A]

    Permalink
  12. def NonEmptyStream[A](head: A, tail: Stream[A] = Stream.empty): NonEmptyStream[A]

    Permalink
  13. def NonEmptyVector[A](head: A, tail: A*): NonEmptyVector[A]

    Permalink
  14. def NonEmptyVector[A](head: A, tail: Vector[A] = Vector.empty): NonEmptyVector[A]

    Permalink
  15. object OneAnd extends OneAndInstances with Serializable

    Permalink
  16. object OptionT extends OptionTInstances with Serializable

    Permalink
  17. object Prod extends ProdInstances with Serializable

    Permalink
  18. object Reader extends Serializable

    Permalink
  19. val ReaderT: Kleisli.type

    Permalink
  20. object State extends StateFunctions with Serializable

    Permalink
  21. object StateT extends StateTInstances with Serializable

    Permalink
  22. object Validated extends ValidatedInstances with ValidatedFunctions with Serializable

    Permalink
  23. object Writer extends Serializable

    Permalink
  24. object WriterT extends WriterTInstances with WriterTFunctions with Serializable

    Permalink
  25. object Xor extends XorInstances with XorFunctions with Serializable

    Permalink
  26. object XorT extends XorTInstances with XorTFunctions with Serializable

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped