MonixCpsMonad

given MonixCpsMonad: CpsAsyncEffectMonad[[A] =>> Task[A]]

CpsMonad for Monix Task

Type members

Inherited types

type WF[X] = F[X]
Inherited from
CpsMonad

Value members

Concrete methods

def adoptCallbackStyle[A](source: Try[A] => Unit => Unit): Task[A]
def error[A](e: Throwable): Task[A]
def flatMap[A, B](fa: Task[A])(f: A => Task[B]): Task[B]
def flatMapTry[A, B](fa: Task[A])(f: Try[A] => Task[B]): Task[B]
def map[A, B](fa: Task[A])(f: A => B): Task[B]
def pure[T](t: T): Task[T]

Inherited methods

def delay[T](x: => T): Task[T]

For effect monads it is usually the same, as pure, but unlike pure, argument of evaluation is lazy.

For effect monads it is usually the same, as pure, but unlike pure, argument of evaluation is lazy.

Note, that delay is close to original return in haskell with lazy evaluation semantics. So, for effect monads, representing pure as eager function is a simplification of semantics, real binding to monads in math sence, should be with delay instead pure

Inherited from
CpsEffectMonad
def delayedUnit: Task[Unit]

Delayed evaluation of unit. If you want to override this for you monad, you should overrid delayed to.

Delayed evaluation of unit. If you want to override this for you monad, you should overrid delayed to.

Inherited from
CpsEffectMonad
def flatDelay[T](x: => Task[T]): Task[T]

shortcat for delayed evaluation of effect.

shortcat for delayed evaluation of effect.

Inherited from
CpsEffectMonad
def fromTry[A](r: Try[A]): Task[A]
Inherited from
CpsTryMonad
def mapTry[A, B](fa: Task[A])(f: Try[A] => B): Task[B]

map over result of checked evaluation of A

map over result of checked evaluation of A

Inherited from
CpsTryMonad
def mapTryAsync[A, B](fa: Task[A])(f: Try[A] => Task[B]): Task[B]

synonym for flatMapTry needed for processing awaits inside mapTry.

synonym for flatMapTry needed for processing awaits inside mapTry.

Inherited from
CpsTryMonad
def restore[A](fa: Task[A])(fx: Throwable => Task[A]): Task[A]

restore fa, ie if fa sucessful - return fa, otherwise apply fx to received error.

restore fa, ie if fa sucessful - return fa, otherwise apply fx to received error.

Inherited from
CpsTryMonad
def tryImpure[A](a: => Task[A]): Task[A]

try to evaluate async operation and wrap successful or failed result into F.

try to evaluate async operation and wrap successful or failed result into F.

Inherited from
CpsTryMonad
def tryPure[A](a: => A): Task[A]

try to evaluate synchonious operation and wrap successful or failed result into F.

try to evaluate synchonious operation and wrap successful or failed result into F.

Inherited from
CpsTryMonad
def tryPureAsync[A](a: () => Task[A]): Task[A]

async shift of tryPure.

async shift of tryPure.

Inherited from
CpsTryMonad
def withAction[A](fa: Task[A])(action: => Unit): Task[A]

ensure that action will run before getting value from fa

ensure that action will run before getting value from fa

Inherited from
CpsTryMonad
def withActionAsync[A](fa: Task[A])(action: () => Task[Unit]): Task[A]

async shift of withAction.

async shift of withAction.

This method is substituted instead withAction, when we use await inside withAction argument.

Inherited from
CpsTryMonad
def withAsyncAction[A](fa: Task[A])(action: => Task[Unit]): Task[A]

return result of fa after completition of action.

return result of fa after completition of action.

Inherited from
CpsTryMonad