packages feed

io-classes-mtl-0.1.2.0 / src / Control / Monad / Class / MonadST / Trans.hs

{-# OPTIONS_GHC -Wno-orphans #-}{-# OPTIONS_GHC -Wno-deprecations #-}module Control.Monad.Class.MonadST.Trans () whereimport           Control.Monad.Cont (ContT)import           Control.Monad.Except (ExceptT)import qualified Control.Monad.RWS.Lazy as Lazyimport qualified Control.Monad.RWS.Strict as Strictimport qualified Control.Monad.State.Lazy as Lazyimport qualified Control.Monad.State.Strict as Strictimport           Control.Monad.Trans (lift)import qualified Control.Monad.Writer.Lazy as Lazyimport qualified Control.Monad.Writer.Strict as Strictimport           Control.Monad.Class.MonadSTinstance MonadST m => MonadST (ContT r m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance MonadST m => MonadST (ExceptT e m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance (Monoid w, MonadST m) => MonadST (Lazy.RWST r w s m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance (Monoid w, MonadST m) => MonadST (Strict.RWST r w s m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance MonadST m => MonadST (Lazy.StateT s m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance MonadST m => MonadST (Strict.StateT s m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)instance (Monoid w, MonadST m) => MonadST (Lazy.WriterT w m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g) instance (Monoid w, MonadST m) => MonadST (Strict.WriterT w m) where  stToIO = lift . stToIO  withLiftST f = withLiftST $ \g -> f (lift . g)