given_CpsAsyncMonad_AsyncFreeMonad_CpsTryMonadInstanceContext_AsyncFreeMonad

cps.monads.AsyncFreeMonad$.given_CpsAsyncMonad_AsyncFreeMonad_CpsTryMonadInstanceContext_AsyncFreeMonad$

Attributes

Source
FreeCpsMonad.scala
Graph
Supertypes
Self type

Members list

Type members

Inherited types

Attributes

Inherited from:
CpsTryMonadInstanceContext
Source
CpsMonadContext.scala
type WF[X] = F[X]

Attributes

Inherited from:
CpsMonad
Source
CpsMonad.scala

Value members

Concrete methods

def adoptCallbackStyle[A](source: (Try[A] => Unit) => Unit): AsyncFreeMonad[A]

called by the source, which accept callback inside

called by the source, which accept callback inside

Attributes

Source
FreeCpsMonad.scala
def error[A](e: Throwable): AsyncFreeMonad[A]

represent error e in monadic context.

represent error e in monadic context.

Attributes

Source
FreeCpsMonad.scala
def flatMap[A, B](fa: AsyncFreeMonad[A])(f: A => AsyncFreeMonad[B]): AsyncFreeMonad[B]

bind combinator, which compose f over fa

bind combinator, which compose f over fa

Attributes

Source
FreeCpsMonad.scala
def flatMapTry[A, B](fa: AsyncFreeMonad[A])(f: Try[A] => AsyncFreeMonad[B]): AsyncFreeMonad[B]

flatMap over result of checked evaluation of A

flatMap over result of checked evaluation of A

Attributes

Source
FreeCpsMonad.scala
def map[A, B](fa: AsyncFreeMonad[A])(f: A => B): AsyncFreeMonad[B]

map a function f over fa

map a function f over fa

Attributes

Source
FreeCpsMonad.scala
def pure[A](a: A): AsyncFreeMonad[A]

Pure - wrap value t inside monad.

Pure - wrap value t inside monad.

Note, that pure use eager evaluation, which is different from Haskell.

Attributes

Source
FreeCpsMonad.scala

Inherited methods

override def apply[T](op: Context => AsyncFreeMonad[T]): F[T]

run op in the context environment.

run op in the context environment.

Attributes

Definition Classes
Inherited from:
CpsTryMonadInstanceContext
Source
CpsMonadContext.scala
def fromTry[A](r: Try[A]): F[A]

transform r into pure value or error.

transform r into pure value or error.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def lazyPure[T](op: => T): F[T]

Lazy variant of pure, which by default - create monadic expression according to the choosen monad types. (i.e. delaing for effect monads, starting for eager monand, pure by defiault)

Lazy variant of pure, which by default - create monadic expression according to the choosen monad types. (i.e. delaing for effect monads, starting for eager monand, pure by defiault)

Attributes

Inherited from:
CpsMonad
Source
CpsMonad.scala
def mapTry[A, B](fa: AsyncFreeMonad[A])(f: Try[A] => B): F[B]

map over result of checked evaluation of A

map over result of checked evaluation of A

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def mapTryAsync[A, B](fa: AsyncFreeMonad[A])(f: Try[A] => AsyncFreeMonad[B]): F[B]

synonym for flatMapTry needed for processing awaits inside mapTry.

synonym for flatMapTry needed for processing awaits inside mapTry.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def restore[A](fa: AsyncFreeMonad[A])(fx: Throwable => AsyncFreeMonad[A]): F[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.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def tryImpure[A](a: => AsyncFreeMonad[A]): F[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.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def tryPure[A](a: => A): F[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.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def tryPureAsync[A](a: () => AsyncFreeMonad[A]): F[A]

async shift of tryPure.

async shift of tryPure.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def withAction[A](fa: AsyncFreeMonad[A])(action: => Unit): F[A]

ensure that action will run before getting value from fa

ensure that action will run before getting value from fa

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def withActionAsync[A](fa: AsyncFreeMonad[A])(action: () => AsyncFreeMonad[Unit]): F[A]

async shift of withAction.

async shift of withAction.

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

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def withAsyncAction[A](fa: AsyncFreeMonad[A])(action: => AsyncFreeMonad[Unit]): F[A]

return result of fa after completition of action.

return result of fa after completition of action.

Attributes

Inherited from:
CpsTryMonad
Source
CpsMonad.scala
def withAsyncErrorHandler[A](fa: AsyncFreeMonad[A])(f: Throwable => AsyncFreeMonad[A]): F[A]

Attributes

Inherited from:
CpsTrySupport
Source
CpsMonad.scala
def withAsyncFinalizer[A](fa: AsyncFreeMonad[A])(f: => AsyncFreeMonad[Unit]): F[A]

Attributes

Inherited from:
CpsTrySupport
Source
CpsMonad.scala