Proposal: merge Data.Functor.Coproduct into transformers

Sean Leather leather at cs.uu.nl
Sun Dec 16 11:55:47 CET 2012


On Sun, Dec 16, 2012 at 1:57 AM, Ross Paterson wrote:

> On Sat, Dec 15, 2012 at 09:24:48PM +0000, Henning Thielemann wrote:
> > Since I proposed that and became aware of the newtype solution in the
> > meantime, I change my mind to:
> >
> > > data Sum f g a = Sum { getSum :: Either (f a) (g a) }
>
> OK, let's do that.  It matches the treatment of Product.
> (So now they'll both clash with Data.Monoid.)
>

Great!

I'm guessing the smart constructors and eliminator should still be
included? We had: left, right, coproduct. Do we now have: left, right, sum?

Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121216/3cbff419/attachment.htm>


More information about the Libraries mailing list