ross at soi.city.ac.uk ross at soi.city.ac.uk
Mon Apr 5 18:20:00 EDT 2004

On Mon, Apr 05, 2004 at 06:13:29PM +0200, Sven Panne wrote:
> ross at soi.city.ac.uk wrote:
> >How about making Data.Monoid portable, by replacing the a -> a instance
> >with one for a newtype?
> Although this would change the interface of Data.Monoid a tiny bit, this
> seems the most attractive solution. I seriously doubt that the a -> a
> instance is really widely used...

Hmm, ShowS is a special case.

> Do you have a concrete newtype in mind? I'm currently not sure if we already
> have something like this...

newtype Endo a = Endo { runEndo :: a -> a }

More information about the Libraries mailing list