CpsThrowMonadInstanceContext

cps.CpsThrowMonadInstanceContext

Minimal monad context, which provides an instance of CpsThrowMonad. Use it if your monad supports throw operation but not try/catch.

Attributes

Graph
Supertypes
trait CpsThrowMonad[F]
trait CpsThrowSupport[F]
trait CpsMonad[F]
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Type members

Types

Inherited types

type WF[X] = F[X]

Attributes

Inherited from:
CpsMonad

Value members

Concrete methods

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

run op in the context environment.

run op in the context environment.

Attributes

Definition Classes

Inherited methods

def error[A](e: Throwable): F[A]

represent error e in monadic context.

represent error e in monadic context.

Attributes

Inherited from:
CpsThrowSupport
def flatMap[A, B](fa: F[A])(f: A => F[B]): F[B]

bind combinator, which compose f over fa

bind combinator, which compose f over fa

Attributes

Inherited from:
CpsMonad
def flatWrap[T](op: => F[T]): F[T]

Wrap and flatten of monadic expression..

Wrap and flatten of monadic expression..

Attributes

Inherited from:
CpsMonad
def flatten[T](ffa: F[F[T]]): F[T]

Attributes

Inherited from:
CpsMonad
def map[A, B](fa: F[A])(f: A => B): F[B]

map a function f over fa

map a function f over fa

Attributes

Inherited from:
CpsMonad
def pure[T](t: T): F[T]

Pure - wrap value t inside monad.

Pure - wrap value t inside monad.

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

Attributes

Inherited from:
CpsMonad
def wrap[T](op: => T): F[T]

Create monadic expression according to the default operation of choosen monad types. (i.e. delaying for effect monads, starting for eager monand, pure by default)

Create monadic expression according to the default operation of choosen monad types. (i.e. delaying for effect monads, starting for eager monand, pure by default)

Attributes

Inherited from:
CpsMonad