[Haskell-cafe] Reader monad

Michael Lazarev lazarev.michael at gmail.com
Wed Dec 29 23:34:59 CET 2010


2010/12/30 David Leimbach <leimy2k at gmail.com>:
>
> Reader Writer State is commonly needed in big applications so transformers
> provides one for us:
> http://hackage.haskell.org/packages/archive/transformers/0.2.2.0/doc/html/Control-Monad-Trans-RWS-Lazy.html
> Pretty cool stuff if you ask me.  I often wondered about the correct
> stacking order of Monad transformers, or how often it mattered.

Thanks, it is very cool indeed!
And it turns out that it's not simply kind of the "type RWST r w s m a
= ReaderT r WriterT w StateT s m a",
it has completely independent implementation. It is done in one layer,
so no lifts for tell, get, put, modify and so on.



More information about the Haskell-Cafe mailing list