mtlx-0.1.5: Monad transformer library with type indexes, providing 'free' copies.

Portabilitynon-portable (multi-param classes, functional dependencies)
MaintainerMark Snyder,






newtype ReaderX ix r a Source




runReaderX' :: r -> a


Index ix => MonadReaderX ix r (ReaderX ix r) 
Index ix => Monad (ReaderX ix r) 
Index ix => Functor (ReaderX ix r) 
Index ix => MonadFix (ReaderX ix r) 

mkReaderX :: Index ix => ix -> (r -> a) -> ReaderX ix r aSource

runReaderX :: Index ix => ix -> ReaderX ix r a -> r -> aSource

mapReaderx :: Index ix => ix -> (a -> b) -> ReaderX ix r a -> ReaderX ix r bSource

withReaderx :: Index ix => ix -> (r' -> r) -> ReaderX ix r a -> ReaderX ix r' aSource

A more general version of local.

newtype ReaderTX ix r m a Source




runReaderTX' :: r -> m a


(Monoid w, Index ix2, MonadReader r m, MonadState s m, MonadWriter w m) => MonadRWS r w s (ReaderTX ix2 r2 m) 
(Index ix1, Index ix2, MonadReaderX ix1 r1 m) => MonadReaderX ix1 r1 (ReaderTX ix2 r2 m) 
(Monad m, Index ix) => MonadReaderX ix r (ReaderTX ix r m) 
(Index ixr, Index ixs, MonadStateX ixs s m) => MonadStateX ixs s (ReaderTX ixr r m) 
(Index ixr, MonadWriterX ixw w m) => MonadWriterX ixw w (ReaderTX ixr r m) 
(MonadErrorX ixe e m, Index ixe, Index ixr) => MonadErrorX ixe e (ReaderTX ixr r m) 
(MonadError e m, Index ix) => MonadError e (ReaderTX ix r m) 
(MonadReader r m, Index ix) => MonadReader r (ReaderTX ix r2 m) 
(Index ix, MonadState s m) => MonadState s (ReaderTX ix r m) 
(Index ix, MonadWriter w m) => MonadWriter w (ReaderTX ix r m) 
Index ix => MonadTrans (ReaderTX ix r) 
(Monad m, Index ix) => Monad (ReaderTX ix r m) 
(Monad m, Index ix) => Functor (ReaderTX ix r m) 
(MonadFix m, Index ix) => MonadFix (ReaderTX ix r m) 
(MonadPlus m, Index ix) => MonadPlus (ReaderTX ix r m) 
(MonadIO m, Index ix) => MonadIO (ReaderTX ix r m) 
(MonadCont m, Index ix) => MonadCont (ReaderTX ix r m) 

mkReaderTX :: Index ix => ix -> (r -> m a) -> ReaderTX ix r m aSource

runReaderTX :: Index ix => ix -> ReaderTX ix r m a -> r -> m aSource

mapReaderTX :: Index ix => ix -> (m a -> n b) -> ReaderTX ix w m a -> ReaderTX ix w n bSource

withReaderTX :: Index ix => ix -> (r' -> r) -> ReaderTX ix r m a -> ReaderTX ix r' m aSource