different flavours of Monad Template Library

Ross Paterson ross at soi.city.ac.uk
Mon Jan 5 04:20:11 EST 2009


On Mon, Jan 05, 2009 at 09:32:21AM +0100, Henning Thielemann wrote:
> On Mon, 5 Jan 2009, Ross Paterson wrote:
>> On Mon, Jan 05, 2009 at 01:07:00AM +0100, Henning Thielemann wrote:
>>> However, Control.Monad.Identity would conflict with MTL.
>>
>> Unfortunately that is necessary to make the split work.  If we have
>> a monad-classes-fd package, clients would have to depend on both it
>> and transformers.
>
> 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.

> 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.


More information about the Libraries mailing list