new major release of transformers package

Ross Paterson ross at
Thu Mar 8 01:43:48 CET 2012

Seeking views before a new major release of transformers package.
The docs are here:

The source is here:

	darcs get

The major changes from version are:

* Foldable and Traversable instances for transformers that support them.
* extra Monad instances:

        instance (MonadFix m) => MonadFix (MaybeT m)
        instance (MonadFix m) => MonadFix (IdentityT m)
        instance (Monad f, Monad g) => Monad (Product f g)
        instance (MonadPlus f, MonadPlus g) => MonadPlus (Product f g)
        instance (MonadFix f, MonadFix g) => MonadFix (Product f g)

* new functors Backwards and Reverse
* a new Lift transformer, a generalization of Errors
* generalized constructor functions:

        state :: Monad m => (s -> (a, s)) -> StateT s m a
        reader :: Monad m => (r -> a) -> ReaderT r m a
        writer :: Monad m => (a, w) -> WriterT w m a

Another issue that has been raised is: should the instance

        instance Monad (ContT r m)

have a Monad constraint so that it can define fail?

More information about the Libraries mailing list