Module

Control.Monad.Trans.Control

Package
purescript-monad-control
Repository
athanclark/purescript-monad-control

#MonadTransControl Source

class (MonadTrans t, Monad m) <= MonadTransControl m t stT | t -> stT where

Members

  • liftWith :: forall b. ((forall a. t m a -> m (stT a)) -> m b) -> t m b
  • restoreT :: forall a. m (stT a) -> t m a

Instances

#integrateT Source

integrateT :: forall a stT t m. Bind (t m) => MonadTransControl m t stT => t m (stT a) -> t m a

Pack a state belonging to t back into it, instead of throwing it away

#MonadBaseControl Source

class (MonadBase base m) <= MonadBaseControl base m stM | m -> stM base where

Members

  • liftBaseWith :: forall b. ((forall a. m a -> base (stM a)) -> base b) -> m b
  • restoreM :: forall a. base (stM a) -> m a

Instances

#integrateM Source

integrateM :: forall a stM m base. Applicative base => MonadBaseControl base m stM => m (stM a) -> m a

Pack a state belonging to m back into it, instead of throwing it away

#defaultLiftBaseWith Source

defaultLiftBaseWith :: forall b stT stM t m base. MonadBaseControl base m stM => Monad m => Monad base => MonadTrans t => MonadTransControl m t stT => ((forall a. t m a -> base (Compose stM stT a)) -> base b) -> t m b

#defaultRestoreM Source

defaultRestoreM :: forall a stT stM t m base. MonadBaseControl base m stM => Monad m => Monad base => MonadTrans t => MonadTransControl m t stT => base (Compose stM stT a) -> t m a

#WriterTStT Source

data WriterTStT w a

Constructors

Instances

#writerTStTToTuple Source

writerTStTToTuple :: forall a w. WriterTStT w a -> Tuple a w

#tupleToWriterTStT Source

tupleToWriterTStT :: forall a w. Tuple a w -> WriterTStT w a

#FreeTStT Source

newtype FreeTStT f m a

Constructors

Instances

#freeTStTToEither Source

freeTStTToEither :: forall a m f. FreeTStT f m a -> Either a (f (FreeT f m a))

#eitherToFreeTStT Source

eitherToFreeTStT :: forall a m f. Either a (f (FreeT f m a)) -> FreeTStT f m a