<br><div class="gmail_quote">On Wed, Mar 7, 2012 at 7:43 PM, Ross Paterson <span dir="ltr">&lt;<a href="mailto:ross@soi.city.ac.uk">ross@soi.city.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Seeking views before a new major release of transformers package.<br>
The docs are here:<br>
<br>
        <a href="http://code.haskell.org/~ross/transformers/dist/doc/html/transformers/" target="_blank">http://code.haskell.org/~ross/transformers/dist/doc/html/transformers/</a><br>
<br>
The source is here:<br>
<br>
        darcs get <a href="http://code.haskell.org/~ross/transformers" target="_blank">http://code.haskell.org/~ross/transformers</a><br>
<br>
The major changes from version 0.2.2.0 are:<br>
<br>
* Foldable and Traversable instances for transformers that support them.<br>
* extra Monad instances:<br>
<br>
        instance (MonadFix m) =&gt; MonadFix (MaybeT m)<br>
        instance (MonadFix m) =&gt; MonadFix (IdentityT m)<br>
        instance (Monad f, Monad g) =&gt; Monad (Product f g)<br>
        instance (MonadPlus f, MonadPlus g) =&gt; MonadPlus (Product f g)<br>
        instance (MonadFix f, MonadFix g) =&gt; MonadFix (Product f g)<br>
<br>
* new functors Backwards and Reverse<br>
* a new Lift transformer, a generalization of Errors<br>
* generalized constructor functions:<br>
<br>
        state :: Monad m =&gt; (s -&gt; (a, s)) -&gt; StateT s m a<br>
        reader :: Monad m =&gt; (r -&gt; a) -&gt; ReaderT r m a<br>
        writer :: Monad m =&gt; (a, w) -&gt; WriterT w m a<br></blockquote><div> </div><div>Hrmm.<div><br></div><div>If the definitions of &#39;modify&#39; ran through &#39;state&#39; they could avoid a round trip through the monad.<br>
</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Another issue that has been raised is: should the instance<br>
<br>
        instance Monad (ContT r m)<br>
<br>
have a Monad constraint so that it can define fail?</blockquote><div>  </div><div>Ick. </div><div><br></div><div>One of the things I liked about the recent change that brought the monad instance for Either into Control.Monad.Instances was that we didn&#39;t go out of our way to screw up a perfectly good monad in order to better support fail, and the same argument could be applied to pollute Codensity, which also currently requires nothing of &#39;m&#39;, but which has ContT r m-like uses involving types like Endo. I&#39;m not a fan of &#39;slippery slope&#39; arguments, but this strikes me as a slippery slope. ;)</div>
<div><div><br>-Edward</div></div></div>