restructuring the mtl

Ross Paterson ross at soi.city.ac.uk
Mon Mar 26 14:25:26 EDT 2007


On Wed, Mar 07, 2007 at 11:59:24PM +0000, Ross Paterson wrote:
> I propose that we restructure and split the mtl into two packages:
> 
> mtl-base: a Haskell-98 package containing the monad transformers
> and non-overloaded versions of the operations, [...]
> 
> mtl (depending on mtl-base): multi-parameter+FD type classes with
> instances for the transformers in mtl-base, [...]
> 
> One benefit is that it would be possible to use monad transformers in
> portable programs, at the cost of a little explicit lifting of operations.
> Often when I use a stack of monad transformers, I define aliases for the
> new monad and its operations, so this wouldn't be much extra effort.
> 
> A second benefit is that one could introduce other packages with other
> interfaces, e.g. one using associated types.
> 
> The revised mtl would be almost compatible with the existing one, except
> 1) The monad transformer and corresponding monad would have the same
>    strictness (this has already been done in the HEAD).
> 2) It wouldn't be possible to declare instances for the corresponding monad.

I have had a go at this re-organization:

src:	darcs get http://darcs.haskell.org/packages/mtl-split
docs:	http://www.soi.city.ac.uk/~ross/mtl-split/

The plan is to split Control.Monad.Identity, Control.Monad.Trans and
Control.Monad.Trans.* off into a separate (portable) package.



More information about the Libraries mailing list