different flavours of Monad Template Library

Henning Thielemann lemming at henning-thielemann.de
Mon Jan 12 10:47:31 EST 2009


On Mon, 12 Jan 2009, Wolfgang Jeltsch wrote:

> Hello,
>
> it?s already problematic, that State, StateT etc. are under Control.Monad.
> While they are monads, they are also applicative functors, for example.  And
> some ?monad transformers? are also applicative functor transformers and
> probably all of them are functor transformers.  There are situations where
> you want to use these types only as applicative functors, for example when
> composing context-free parsers.

I already posted something similar, with no response:
   http://www.haskell.org/pipermail/libraries/2007-October/008274.html

Maybe this time is better?

> During this restructuring, we could also rename State to StateTrans since
> values of State are not states but state transformers.

Right, I also like to use 'state' as identifier for a state, not for a 
stateful action. And I was confused, by Reader not being really a 
counterpart to Writer. If I want to read, what I wrote with Writer, I 
usually have to use a State monad, not Reader. 'Context' or 'Environment' 
seems to be a better name for 'Reader'.


More information about the Libraries mailing list