object IorT extends IorTInstances with Serializable
- Alphabetic
- By Inheritance
- IorT
- Serializable
- Serializable
- IorTInstances
- IorTInstances1
- IorTInstances2
- IorTInstances3
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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 aF[A]
and aF[B]
Creates a both version of
IorT[F, A, B]
from aF[A]
and aF[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)))
-
final
def
bothT[F[_]]: BothTPartiallyApplied[F]
Creates a both version of
IorT[F, A, B]
from aA
and aB
Creates a both version of
IorT[F, A, B]
from aA
and aB
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)))
-
implicit
def
catsDataBifunctorForIorT[F[_]](implicit F: Functor[F]): Bifunctor[[β$8$, γ$9$]IorT[F, β$8$, γ$9$]]
- Definition Classes
- IorTInstances
-
implicit
def
catsDataDeferForIor[F[_], E](implicit F: Defer[F]): Defer[[γ$34$]IorT[F, E, γ$34$]]
- Definition Classes
- IorTInstances
-
implicit
def
catsDataEqForIorT[F[_], A, B](implicit F: Eq[F[Ior[A, B]]]): Eq[IorT[F, A, B]]
- Definition Classes
- IorTInstances2
-
implicit
def
catsDataFoldableForIorT[F[_], A](implicit F: Foldable[F]): Foldable[[γ$36$]IorT[F, A, γ$36$]]
- Definition Classes
- IorTInstances1
-
implicit
def
catsDataFunctorForIorT[F[_], A](implicit F: Functor[F]): Functor[[γ$57$]IorT[F, A, γ$57$]]
- Definition Classes
- IorTInstances3
-
implicit
def
catsDataMonadErrorFForIorT[F[_], A, E](implicit FE: MonadError[F, E], A: Semigroup[A]): MonadError[[γ$56$]IorT[F, A, γ$56$], E]
- Definition Classes
- IorTInstances2
-
implicit
def
catsDataMonadErrorForIorT[F[_], A](implicit F: Monad[F], A: Semigroup[A]): MonadError[[γ$37$]IorT[F, A, γ$37$], A]
- Definition Classes
- IorTInstances1
-
implicit
def
catsDataMonoidForIorT[F[_], A, B](implicit F: Monoid[F[Ior[A, B]]]): Monoid[IorT[F, A, B]]
- Definition Classes
- IorTInstances
-
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
-
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
-
implicit
def
catsDataSemigroupForIorT[F[_], A, B](implicit F: Semigroup[F[Ior[A, B]]]): Semigroup[IorT[F, A, B]]
- Definition Classes
- IorTInstances1
-
implicit
def
catsDataShowForIorT[F[_], A, B](implicit sh: Show[F[Ior[A, B]]]): Show[IorT[F, A, B]]
- Definition Classes
- IorTInstances
-
implicit
def
catsDataTraverseForIorT[F[_], A](implicit F: Traverse[F]): Traverse[[γ$12$]IorT[F, A, γ$12$]]
- Definition Classes
- IorTInstances
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
cond[F[_]]: CondPartiallyApplied[F]
If the condition is satisfied, return the given
B
inIor.Right
, otherwise, return the givenA
inIor.Left
, lifted into the specifiedApplicative
.If the condition is satisfied, return the given
B
inIor.Right
, otherwise, return the givenA
inIor.Left
, lifted into the specifiedApplicative
.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)))
-
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
onF[B]
, otherwise, return the value ofIorT.left
onF[A]
.If the condition is satisfied, return the value of
IorT.right
onF[B]
, otherwise, return the value ofIorT.left
onF[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)
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
fromEither[F[_]]: FromEitherPartiallyApplied[F]
Transforms an
Either
into anIorT
, lifted into the specifiedApplicative
.Transforms an
Either
into anIorT
, lifted into the specifiedApplicative
.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)))
-
final
def
fromEitherF[F[_], E, A](feither: F[Either[E, A]])(implicit F: Functor[F]): IorT[F, E, A]
Transforms an
F[Either]
into anIorT
.Transforms an
F[Either]
into anIorT
.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)))
-
final
def
fromIor[F[_]]: FromIorPartiallyApplied[F]
Transforms an
Ior
into anIorT
, lifted into the specifiedApplicative
.Transforms an
Ior
into anIorT
, lifted into the specifiedApplicative
.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)))
-
final
def
fromOption[F[_]]: FromOptionPartiallyApplied[F]
Transforms an
Option
into anIorT
, lifted into the specifiedApplicative
and using the second argument if theOption
is aNone
.Transforms an
Option
into anIorT
, lifted into the specifiedApplicative
and using the second argument if theOption
is aNone
.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)))
-
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 anIorT
, using the second argument if theOption
is aNone
.Transforms an
F[Option]
into anIorT
, using the second argument if theOption
is aNone
.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)))
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
left[B]: LeftPartiallyApplied[B]
Creates a left version of
IorT[F, A, B]
from aF[A]
Creates a left version of
IorT[F, A, B]
from aF[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)))
-
final
def
leftT[F[_], B]: LeftTPartiallyApplied[F, B]
Creates a left version of
IorT[F, A, B]
from aA
Creates a left version of
IorT[F, A, B]
from aA
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)))
-
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)
-
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))
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
pure[F[_], A]: PurePartiallyApplied[F, A]
Creates a right version of
IorT[F, A, B]
from aB
Creates a right version of
IorT[F, A, B]
from aB
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)))
-
final
def
right[A]: RightPartiallyApplied[A]
Creates a right version of
IorT[F, A, B]
from aF[B]
Creates a right version of
IorT[F, A, B]
from aF[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)))
-
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)))
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )