import Control.Monad.State
import Control.Monad.Reader

data XConf = XConf {}
data XState = XState {}

newtype X a = X (ReaderT XConf (StateT XState IO) a)

> :t StateT
StateT :: (s -> m (a, s)) -> StateT s m a

> :t ReaderT
ReaderT :: (r -> m a) -> ReaderT r m a

then how to use `X` ?  Would you mind explaining the newtype X in detail ?

Sinerely!

-----
fac n = foldr (*) 1 [1..n]
-- 
View this message in context: 
http://old.nabble.com/I-really-donot-know-how-to-use-%60newtype%60---tp26541671p26541671.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to