Proposal: Bounded instance for IntSet (ticket #1953)

David Benbennick dbenbenn at
Mon Dec 3 10:22:48 EST 2007

On 12/3/07, Yitzchak Gale <gale at> wrote:
> In this case, the Ord instance is not really natural; it is defined
> for technical reasons for use by the library itself (and its
> friends). The library has no need for a Bounded instance, so why
> should we prevent people from defining one for some other purpose?

Note that in one sense, people are already prevented from defining a
different Bounded instance.  Any Bounded instance other than the one
suggested in this proposal would fail to obey the axioms of the
Bounded class.  In other words, there is a unique largest element, and
a unique smallest element, an no one can legitimately define a
different Bounded instance.

Given that the Bounded instance is uniquely defined, I think it is
more convenient to have it defined by the library than to have to
manually define it in every program that uses it.

More information about the Libraries mailing list