Proposal: Bounded instance for IntSet (ticket #1953)

Aaron Denney wnoise at
Tue Dec 4 19:24:52 EST 2007

On 2007-12-04, Ross Paterson <ross at> wrote:
> On Mon, Dec 03, 2007 at 03:32:52PM +0200, Yitzchak Gale wrote:
>> Henning Thielemann wrote:
>> > is not sensible to have different instances for the same
>> > type and class, because they will collide sooner or later.
>> True. That is why libraries should not define an instance
>> at all, unless they are quite certain that it is by far the most
>> important instance that anyone will ever want to use.
> I would draw the opposite conclusion from the same data: if a sensible
> instance can be identified, it should accompany either the class or
> the type constructor.  If people define orphan instances, they will
> eventually collide, even they are identical.  (There are a few orphans in
> Control.Monad.Instances, but that is required to preserve compatibility
> with Haskell 98.)

I strongly concur.

Aaron Denney

More information about the Libraries mailing list