Trait/Object

scalaz.monad.control

MonadTransControl

Related Docs: object MonadTransControl | package control

Permalink

trait MonadTransControl[T[_[_], _]] extends MonadTrans[T]

Linear Supertypes
MonadTrans[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MonadTransControl
  2. MonadTrans
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Run extends AnyRef

    Permalink

    A function that runs a transformed monad T n on the monadic state that was captured by liftWith

    A function that runs a transformed monad T n on the monadic state that was captured by liftWith

    A Run function yields a computation in M that returns the monadic state of T. This state can later be used to restore a T computation using restoreT.

  2. abstract type StT[A]

    Permalink

    Monadic state of T.

Abstract Value Members

  1. implicit abstract def apply[G[_]](implicit arg0: Monad[G]): Monad[[α]T[G, α]]

    Permalink
    Definition Classes
    MonadTrans
  2. abstract def liftM[G[_], A](a: G[A])(implicit arg0: Monad[G]): T[G, A]

    Permalink
    Definition Classes
    MonadTrans
  3. abstract def liftWith[M[_], A](f: (Run) ⇒ M[A])(implicit arg0: Monad[M]): T[M, A]

    Permalink

    liftWith is similar to liftM in that it lifts a computation from the argument monad to the constructed monad.

    liftWith is similar to liftM in that it lifts a computation from the argument monad to the constructed monad.

    Instances should satisfy similar laws as the MonadTrans laws:

    liftWith . const . return = return liftWith (const (m >>= f)) = liftWith (const m) >>= liftWith . const . f

    The difference with liftM is that before lifting the M computation liftWith captures the state of T. It then provides the M computation with a Run function that allows running T[M, ?] computations in M (for all M) on the captured state.

  4. abstract def restoreT[M[_], A](st: M[StT[A]])(implicit arg0: Monad[M]): T[M, A]

    Permalink

    Construct a T computation from the monadic state of T that is returned from a Run function.

    Construct a T computation from the monadic state of T that is returned from a Run function.

    Instances should satisfy:

    liftWith (\run -> run t) >>= restoreT . return = t

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def control[M[_], A](f: (Run) ⇒ M[StT[A]])(implicit arg0: Monad[M]): T[M, A]

    Permalink

    An often used composition: control f = liftWith f >>= restoreT . return

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def liftMU[GA](a: GA)(implicit G: Unapply[Monad, GA]): T[M, A]

    Permalink
    Definition Classes
    MonadTrans
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from MonadTrans[T]

Inherited from AnyRef

Inherited from Any

Ungrouped