different flavours of Monad Template Library
Henning Thielemann
lemming at henning-thielemann.de
Mon Jan 5 06:54:20 EST 2009
On Mon, 5 Jan 2009, Ross Paterson wrote:
> On Mon, Jan 05, 2009 at 09:32:21AM +0100, Henning Thielemann wrote:
>>
>> How about Control.Monad.Trans.Identity which is re-exported by
>> Control.Monad.Identity in mtl?
>
> Hmm, it's a conflict between co-existing with mtl and using the
> Right Name for the transformers package, which is intended to be
> usable by itself. I prefer the latter, myself.
You mean that Control.Monad.Trans.Identity is not a good name, because
Identity is not a transformer? Then, how about
Control.Monad.Base.Identity, Control.Monad.Primitive.Identity or so?
Since mtl-split is not a drop-in replacement for mtl, we cannot expect a
quick change from mtl to mtl-split in all the packages that currently
import mtl. Thus we have to think about a route of transition and a
package which can be installed in parallel to mtl is a first step, I
think.
>> I also like to have a function 'state', which replaces the former
>> 'State' constructor. I can also submit a patch if you want that.
>
> You mean
>
> state :: (s -> (a, s)) -> State s a
> state f = StateT (Identity . f)
>
> and similarly for all the others? Sounds reasonable.
That's what I mean.
More information about the Libraries
mailing list