Trait

cats.data

EitherTFunctions

Related Doc: package data

Permalink

trait EitherTFunctions extends AnyRef

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

Type Members

  1. final class FromEitherPartiallyApplied[F[_]] extends AnyRef

    Permalink
  2. final class FromOptionPartiallyApplied[F[_]] extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def fromEither[F[_]]: FromEitherPartiallyApplied[F]

    Permalink

    Transforms an Either into an EitherT, lifted into the specified Applicative.

    Transforms an Either into an EitherT, lifted into the specified Applicative.

    Note: The return type is a FromEitherPartiallyApplied[F], which has an apply method on it, allowing you to call fromEither like this:

    scala> import cats.implicits._
    scala> val t: Either[String, Int] = Either.right(3)
    scala> EitherT.fromEither[Option](t)
    res0: EitherT[Option, String, Int] = EitherT(Some(Right(3)))

    The reason for the indirection is to emulate currying type parameters.

  10. final def fromOption[F[_]]: FromOptionPartiallyApplied[F]

    Permalink

    Transforms an Option into an EitherT, lifted into the specified Applicative and using the second argument if the Option is a None.

    Transforms an Option into an EitherT, lifted into the specified Applicative and using the second argument if the Option is a None.

    scala> import cats.implicits._
    scala> val o: Option[Int] = None
    scala> EitherT.fromOption[List](o, "Answer not known.")
    res0: EitherT[List, String, Int]  = EitherT(List(Left(Answer not known.)))
    scala> EitherT.fromOption[List](Some(42), "Answer not known.")
    res1: EitherT[List, String, Int] = EitherT(List(Right(42)))
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def left[F[_], A, B](fa: F[A])(implicit F: Functor[F]): EitherT[F, A, B]

    Permalink
  15. final def liftT[F[_], A, B](fb: F[B])(implicit F: Functor[F]): EitherT[F, A, B]

    Permalink

    Alias for right

    Alias for right

    scala> import cats.data.EitherT
    scala> import cats.implicits._
    scala> val o: Option[Int] = Some(3)
    scala> val n: Option[Int] = None
    scala> EitherT.liftT(o)
    res0: cats.data.EitherT[Option,Nothing,Int] = EitherT(Some(Right(3)))
    scala> EitherT.liftT(n)
    res1: cats.data.EitherT[Option,Nothing,Int] = EitherT(None)
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def pure[F[_], A, B](b: B)(implicit F: Applicative[F]): EitherT[F, A, B]

    Permalink
  20. final def right[F[_], A, B](fb: F[B])(implicit F: Functor[F]): EitherT[F, A, B]

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped