-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Handy functions when using transformers
--   
--   Please see README.md
@package alternators
@version 0.1.2.0

module Control.Monad.Trans.Maybe.Extras
fromMaybeT :: (Alternative t, Functor m) => MaybeT m a -> m (t a)

module Control.Monad.Trans.Reader.Extras

-- | This function combines two different monadic effects, where one of the
--   effects is a reader effect and the other is a producing effect.
--   
--   This version results in the reader monad's inner effect to be wrapped
--   around the producing effect. This requires the Reader inner effect to
--   be an MFunctor on Identity.
--   
--   This can enable past-Dependence. Elm has foldp : (a -&gt; state -&gt;
--   state) -&gt; state -&gt; Signal a -&gt; Signal state This is
--   equivalent to a creating a <tt>StateT state (Signal m) ()</tt>
--   
--   <a>runReaderM</a> is a more general form of <tt>StateT state (Signal
--   m) ()</tt> where given a reader monad to transform "a" to "c" with
--   effects, and an "as" monad that produces "a"s with other effects, run
--   the result of "as" through the reader monad to produce "c"s with both
--   effects. <tt> runReaderM :: Monad m =&gt; Reader a (State s) c -&gt; m
--   a -&gt; StateT s m c runReaderM :: Reader a (State s) c -&gt; Signal
--   STM a -&gt; StateT state (Signal STM) c runReaderM :: Reader a (State
--   s) c -&gt; Pipes.Concurrent.Input a -&gt; StateT state
--   Pipes.Concurrent.Input c </tt>
runReaderM :: (Monad m, Monad (t m), MonadTrans t, MFunctor t) => ReaderT a (t Identity) c -> m a -> t m c

-- | An alternate form of runReaderM where the producing effect is wrapped
--   around the reader monad's inner effect. This requires the producing
--   effect to be an MFunctor on Identity.
runReaderM' :: (Monad m, Monad (t m), MonadTrans t, MFunctor t) => ReaderT a m c -> (t Identity) a -> t m c

module Control.Monad.Trans.State.Lazy.Extras

-- | The problem with <tt>StateT s (MaybeT m) a</tt> is that on failure,
--   the original state is lost. A more useful type is <tt>MaybeT (StateT s
--   m) a</tt> which at least keeps the original input state on failure.
maybeState :: Monad m => StateT s (MaybeT m) a -> MaybeT (StateT s m) a

-- | The problem with <tt>StateT s (ExceptT e m) a</tt> is that on failure,
--   the original state is lost. A more useful type is <tt>ExceptT e
--   (StateT s m) a</tt> which at least keeps the original input state on
--   failure.
exceptState :: Monad m => StateT s (ExceptT e m) a -> ExceptT e (StateT s m) a

module Control.Monad.Trans.State.Strict.Extras

-- | The problem with <tt>StateT s (MaybeT m) a</tt> is that on failure,
--   the original state is lost. A more useful type is <tt>MaybeT (StateT s
--   m) a</tt> which at least keeps the original input state on failure.
maybeState :: Monad m => StateT s (MaybeT m) a -> MaybeT (StateT s m) a

-- | The problem with <tt>StateT s (ExceptT e m) a</tt> is that on failure,
--   the original state is lost. A more useful type is <tt>ExceptT e
--   (StateT s m) a</tt> which at least keeps the original input state on
--   failure.
exceptState :: Monad m => StateT s (ExceptT e m) a -> ExceptT e (StateT s m) a
