Trait/Object

scalaz.monad.control

MonadBaseControl

Related Docs: object MonadBaseControl | package control

Permalink

trait MonadBaseControl[B[_], M[_]] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MonadBaseControl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type RunInBase = Forall[[a](M[a]) ⇒ B[StM[a]]]

    Permalink

    A function that runs a M computation on the monadic state that was captured by liftBaseWith.

    A function that runs a M computation on the monadic state that was captured by liftBaseWith.

    A RunInBase function yields a computation in the base monad of M that returns the monadic state of M. This state can later be used to restore the M computation using restoreM.

  2. abstract type StM[A]

    Permalink

    Monadic state of m.

Abstract Value Members

  1. abstract def liftBaseWith[A](f: (RunInBase) ⇒ B[A]): M[A]

    Permalink

    liftBaseWith is similar to liftIO in that it lifts a base computation to the constructed monad.

    liftBaseWith is similar to liftIO in that it lifts a base computation to the constructed monad.

    Instances should satisfy similar laws as the MonadIO laws:

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

    The difference is that before lifting the base computation liftBaseWith captures the state of M. It then provides the base computation with a RunInBase function that allows running M computations in the base monad on the captured state.

  2. abstract def restoreM[A](st: StM[A]): M[A]

    Permalink

    Construct a M computation from the monadic state of M that is returned from a RunInBase function.

    Construct a M computation from the monadic state of M that is returned from a RunInBase function.

    Instances should satisfy:

    liftBaseWith (\runInBase -> runInBase m) >>= restoreM = m

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[A](f: (RunInBase) ⇒ B[StM[A]])(implicit M: Monad[M]): M[A]

    Permalink

    An often used composition: control f = liftBaseWith f >>= restoreM

  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 ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped