Proposal: merge either into transformers

Roman Cheplyaka roma at ro-che.info
Sun Apr 27 03:54:22 UTC 2014


* Ross Paterson <R.Paterson at city.ac.uk> [2014-04-27 00:51:40+0100]
> On Sat, Apr 26, 2014 at 11:29:01PM +0300, Roman Cheplyaka wrote:
> > I don't understand the issue here. Why does it have to be abstract or
> > based on StateT?
> > 
> > We could simply make a new module with the same WriterT type and the instance
> > 
> >   instance (Monoid w, Monad m) => Monad (WriterT w m) where
> >     m >>= k  = WriterT $ do
> >       (a, w)  <- runWriterT m
> >       (b, w') <- runWriterT (k a)
> >       let w'' = w `mappend` w'
> >       w'' `seq` return (b, w'')
> 
> See Gabriel's analysis:
> 
> http://www.haskell.org/pipermail/libraries/2013-March/019528.html
> 
> The above is version #2 there.

Very illuminating, thanks.

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140427/8e97c216/attachment-0001.sig>


More information about the Libraries mailing list