On Sun, Nov 22, 2009 at 3:47 AM, Felipe Lessa felipe.le...@gmail.com wrote:
...
Well, “ReaderT XConf (StateT XState IO) a” is *the* type :).
It's a monad that is a Reader of XConf and has a State of XState.
... and also wraps a monad to allow IO access inside the X monad.
Cristiano
newtype X a = X (ReaderT XConf (StateT XState IO) a)
#ifndef __HADDOCK__
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader XConf,
Typeable)
#endif
In `X (ReaderT XConf (StateT XState IO) a)`, X is a type constructor, how to
understand `(ReaderT XConf (StateT XState IO) a)` ?
On Sat, Nov 21, 2009 at 06:20:40PM -0800, zaxis wrote:
newtype X a = X (ReaderT XConf (StateT XState IO) a)
#ifndef __HADDOCK__
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader XConf,
Typeable)
#endif
In `X (ReaderT XConf (StateT XState IO) a)`, X is a type constructor,
thanks !
Felipe Lessa wrote:
On Sat, Nov 21, 2009 at 06:20:40PM -0800, zaxis wrote:
newtype X a = X (ReaderT XConf (StateT XState IO) a)
#ifndef __HADDOCK__
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader
XConf,
Typeable)
#endif
In `X (ReaderT XConf (StateT