proposed change to transformers package

wren ng thornton wren at
Sat Mar 27 01:05:45 EDT 2010

Ross Paterson wrote:
> On Fri, Mar 26, 2010 at 05:24:18AM -0700, Nicolas Pouillard wrote:
>> Could we have functors products, sums, fixpoints as well? It would really
>> avoid to redefine them each time.
> Do you mean
>   data Product f g a = Product (f a) (g a)
> with Functor, Foldable, Traversable and Applicative instances?
> Not sure if the other two count as transformers.

Why wouldn't

     data Coproduct f g a = FLeft (f a) | FRight (g a)

with appropriate instances count as a transformer?

Live well,

More information about the Libraries mailing list