[Haskell-cafe] How to understand such a newtype ?

zaxis z_axis at 163.com
Sat Nov 21 21:20:40 EST 2009


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)` ?  And why use `#ifndef
__HADDOCK__` ?

Sincerely!

-----
fac n = foldr (*) 1 [1..n]
-- 
View this message in context: http://old.nabble.com/How-to-understand-such-a-newtype---tp26462332p26462332.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list