object IorT extends IorTInstances with Serializable

Source
IorT.scala
Linear Supertypes
Serializable, Serializable, IorTInstances, IorTInstances1, IorTInstances2, IorTInstances3, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IorT
  2. Serializable
  3. Serializable
  4. IorTInstances
  5. IorTInstances1
  6. IorTInstances2
  7. IorTInstances3
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def both[F[_], A, B](fa: F[A], fb: F[B])(implicit F: Apply[F]): IorT[F, A, B]

    Creates a both version of IorT[F, A, B] from a F[A] and a F[B]

    Creates a both version of IorT[F, A, B] from a F[A] and a F[B]

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.both(Option("err"), Option(3))
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Both(err,3)))
  6. final def bothT[F[_]]: BothTPartiallyApplied[F]

    Creates a both version of IorT[F, A, B] from a A and a B

    Creates a both version of IorT[F, A, B] from a A and a B

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.bothT[Option]("err", 3)
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Both(err,3)))
  7. implicit def catsDataBifunctorForIorT[F[_]](implicit F: Functor[F]): Bifunctor[[β$8$, γ$9$]IorT[F, β$8$, γ$9$]]
    Definition Classes
    IorTInstances
  8. implicit def catsDataDeferForIor[F[_], E](implicit F: Defer[F]): Defer[[γ$34$]IorT[F, E, γ$34$]]
    Definition Classes
    IorTInstances
  9. implicit def catsDataEqForIorT[F[_], A, B](implicit F: Eq[F[Ior[A, B]]]): Eq[IorT[F, A, B]]
    Definition Classes
    IorTInstances2
  10. implicit def catsDataFoldableForIorT[F[_], A](implicit F: Foldable[F]): Foldable[[γ$36$]IorT[F, A, γ$36$]]
    Definition Classes
    IorTInstances1
  11. implicit def catsDataFunctorForIorT[F[_], A](implicit F: Functor[F]): Functor[[γ$57$]IorT[F, A, γ$57$]]
    Definition Classes
    IorTInstances3
  12. implicit def catsDataMonadErrorFForIorT[F[_], A, E](implicit FE: MonadError[F, E], A: Semigroup[A]): MonadError[[γ$56$]IorT[F, A, γ$56$], E]
    Definition Classes
    IorTInstances2
  13. implicit def catsDataMonadErrorForIorT[F[_], A](implicit F: Monad[F], A: Semigroup[A]): MonadError[[γ$37$]IorT[F, A, γ$37$], A]
    Definition Classes
    IorTInstances1
  14. implicit def catsDataMonoidForIorT[F[_], A, B](implicit F: Monoid[F[Ior[A, B]]]): Monoid[IorT[F, A, B]]
    Definition Classes
    IorTInstances
  15. implicit def catsDataParallelForIorTWithParallelEffect[M[_], F[_], E](implicit P: Parallel[M, F], E: Semigroup[E]): Parallel[[γ$13$]IorT[M, E, γ$13$], [γ$14$]IorT[F, E, γ$14$]] { type Dummy }
    Definition Classes
    IorTInstances
  16. implicit def catsDataParallelForIorTWithSequentialEffect[F[_], E](implicit F: Monad[F], E: Semigroup[E]): Parallel[[γ$38$]IorT[F, E, γ$38$], [γ$39$]IorT[F, E, γ$39$]]
    Definition Classes
    IorTInstances1
  17. implicit def catsDataSemigroupForIorT[F[_], A, B](implicit F: Semigroup[F[Ior[A, B]]]): Semigroup[IorT[F, A, B]]
    Definition Classes
    IorTInstances1
  18. implicit def catsDataShowForIorT[F[_], A, B](implicit sh: Show[F[Ior[A, B]]]): Show[IorT[F, A, B]]
    Definition Classes
    IorTInstances
  19. implicit def catsDataTraverseForIorT[F[_], A](implicit F: Traverse[F]): Traverse[[γ$12$]IorT[F, A, γ$12$]]
    Definition Classes
    IorTInstances
  20. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  21. final def cond[F[_]]: CondPartiallyApplied[F]

    If the condition is satisfied, return the given B in Ior.Right, otherwise, return the given A in Ior.Left, lifted into the specified Applicative.

    If the condition is satisfied, return the given B in Ior.Right, otherwise, return the given A in Ior.Left, lifted into the specified Applicative.

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val userInput = "hello world"
    scala> IorT.cond[Option](
         |   userInput.forall(_.isDigit) && userInput.size == 10,
         |   userInput,
         |   "The input does not look like a phone number")
    res0: cats.data.IorT[Option,String,String] = IorT(Some(Left(The input does not look like a phone number)))
  22. final def condF[F[_], A, B](test: Boolean, right: ⇒ F[B], left: ⇒ F[A])(implicit F: Functor[F]): IorT[F, A, B]

    If the condition is satisfied, return the value of IorT.right on F[B], otherwise, return the value of IorT.left on F[A].

    If the condition is satisfied, return the value of IorT.right on F[B], otherwise, return the value of IorT.left on F[A].

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val userInput = "hello world"
    scala> IorT.condF[Option, String, String](
         |   userInput.forall(_.isDigit) && userInput.size == 10,
         |   Some(userInput),
         |   None)
    res0: cats.data.IorT[Option,String,String] = IorT(None)
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def fromEither[F[_]]: FromEitherPartiallyApplied[F]

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

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

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val e: Either[String, Int] = Either.right(3)
    scala> IorT.fromEither[Option](e)
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Right(3)))
  27. final def fromEitherF[F[_], E, A](feither: F[Either[E, A]])(implicit F: Functor[F]): IorT[F, E, A]

    Transforms an F[Either] into an IorT.

    Transforms an F[Either] into an IorT.

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val e: Either[String, Int] = Either.right(3)
    scala> IorT.fromEitherF(Option(e))
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Right(3)))
  28. final def fromIor[F[_]]: FromIorPartiallyApplied[F]

    Transforms an Ior into an IorT, lifted into the specified Applicative.

    Transforms an Ior into an IorT, lifted into the specified Applicative.

    scala> import cats.data.{IorT, Ior}
    scala> import cats.implicits._
    scala> val i: Ior[String, Int] = Ior.both("warning", 3)
    scala> IorT.fromIor[Option](i)
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Both(warning,3)))
  29. final def fromOption[F[_]]: FromOptionPartiallyApplied[F]

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

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

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val o: Option[Int] = None
    scala> IorT.fromOption[List](o, "Answer not known.")
    res0: cats.data.IorT[List,String,Int] = IorT(List(Left(Answer not known.)))
    scala> IorT.fromOption[List](Some(42), "Answer not known.")
    res1: cats.data.IorT[List,String,Int] = IorT(List(Right(42)))
  30. final def fromOptionF[F[_], E, A](foption: F[Option[A]], ifNone: ⇒ E)(implicit F: Functor[F]): IorT[F, E, A]

    Transforms an F[Option] into an IorT, using the second argument if the Option is a None.

    Transforms an F[Option] into an IorT, using the second argument if the Option is a None.

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val o: Option[Int] = None
    scala> IorT.fromOptionF(List(o), "Answer not known.")
    res0: cats.data.IorT[List,String,Int]  = IorT(List(Left(Answer not known.)))
    scala> IorT.fromOptionF(List(Option(42)), "Answer not known.")
    res1: cats.data.IorT[List,String,Int] = IorT(List(Right(42)))
  31. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. final def left[B]: LeftPartiallyApplied[B]

    Creates a left version of IorT[F, A, B] from a F[A]

    Creates a left version of IorT[F, A, B] from a F[A]

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.left[Int](Option("err"))
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Left(err)))
  35. final def leftT[F[_], B]: LeftTPartiallyApplied[F, B]

    Creates a left version of IorT[F, A, B] from a A

    Creates a left version of IorT[F, A, B] from a A

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.leftT[Option, Int]("err")
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Left(err)))
  36. final def liftF[F[_], A, B](fb: F[B])(implicit F: Applicative[F]): IorT[F, A, B]

    Alias for right

    Alias for right

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> val o: Option[Int] = Some(3)
    scala> val n: Option[Int] = None
    scala> IorT.liftF(o)
    res0: cats.data.IorT[Option,Nothing,Int] = IorT(Some(Right(3)))
    scala> IorT.liftF(n)
    res1: cats.data.IorT[Option,Nothing,Int] = IorT(None)
  37. final def liftK[F[_], A](implicit F: Functor[F]): ~>[F, [γ$6$]IorT[F, A, γ$6$]]

    Same as liftF, but expressed as a FunctionK for use with IorT.mapK

    Same as liftF, but expressed as a FunctionK for use with IorT.mapK

    scala> import cats._, data._, implicits._
    scala> val a: OptionT[Eval, Int] = 1.pure[OptionT[Eval, ?]]
    scala> val b: OptionT[IorT[Eval, String, ?], Int] = a.mapK(IorT.liftK)
    scala> b.value.value.value
    res0: cats.data.Ior[String,Option[Int]] = Right(Some(1))
  38. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  41. final def pure[F[_], A]: PurePartiallyApplied[F, A]

    Creates a right version of IorT[F, A, B] from a B

    Creates a right version of IorT[F, A, B] from a B

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.pure[Option, String](3)
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Right(3)))
  42. final def right[A]: RightPartiallyApplied[A]

    Creates a right version of IorT[F, A, B] from a F[B]

    Creates a right version of IorT[F, A, B] from a F[B]

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.right[String](Option(3))
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Right(3)))
  43. final def rightT[F[_], A]: PurePartiallyApplied[F, A]

    Alias for pure

    Alias for pure

    scala> import cats.data.IorT
    scala> import cats.implicits._
    scala> IorT.rightT[Option, String](3)
    res0: cats.data.IorT[Option,String,Int] = IorT(Some(Right(3)))
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from IorTInstances

Inherited from IorTInstances1

Inherited from IorTInstances2

Inherited from IorTInstances3

Inherited from AnyRef

Inherited from Any

Ungrouped