arrow-core-data / arrow.typeclasses / ApplicativeError

ApplicativeError

interface ApplicativeError<F, E> : Applicative<F>

Functions

attempt open fun <A> Kind<F, A>.attempt(): Kind<F, Either<E, A>>
catch open fun <A> ~~catch~~(recover: (Throwable) -> E, f: () -> A): Kind<F, A>
open fun <A> ApplicativeError<F, Throwable>.~~catch~~(f: () -> A): Kind<F, A>
effectCatch open suspend fun <A> effectCatch(fe: (Throwable) -> E, f: suspend () -> A): Kind<F, A>
open suspend fun <F, A> ApplicativeError<F, Throwable>.effectCatch(f: suspend () -> A): Kind<F, A>
fromEither open fun <A, EE> Either<EE, A>.fromEither(f: (EE) -> E): Kind<F, A>
fromOption open fun <A> <ERROR CLASS><A>.fromOption(f: () -> E): Kind<F, A>
fromTry open fun <A> <ERROR CLASS><A>.~~fromTry~~(f: (Throwable) -> E): Kind<F, A>
handleError open fun <A> Kind<F, A>.handleError(f: (E) -> A): Kind<F, A>
handleErrorWith abstract fun <A> Kind<F, A>.handleErrorWith(f: (E) -> Kind<F, A>): Kind<F, A>
raiseError abstract fun <A> raiseError(e: E): Kind<F, A>
open fun <A> E.raiseError(dummy: Unit = Unit): Kind<F, A>
redeem open fun <A, B> Kind<F, A>.redeem(fe: (E) -> B, fb: (A) -> B): Kind<F, B>

Inheritors

MonadError interface MonadError<F, E> : ApplicativeError<F, E>, Monad<F>

Type Class Hierarchy

Do you like Arrow?

Arrow Org
<