Proposal: Bounded instance for IntSet (ticket #1953)

Stefan O'Rear stefanor at
Mon Dec 3 22:08:35 EST 2007

On Mon, Dec 03, 2007 at 05:56:50PM -0800, David Benbennick wrote:
> On 12/3/07, Ross Paterson <ross at> wrote:
> > But in the case at issue, the proposed Bounded instance is
> > counter-intuitive because the underlying Ord instance is.  That Ord
> > instance is an arbitrary choice that is accepted because it allows IntSets
> > to be used as search keys; it makes no sense on its own.
> I don't find that to be the case.  If you had asked me to
> independently come up with an ordering on IntSets, the existing
> ordering is exactly what I would have invented.  As I said earlier,
> lexicographic order is very well known.  It's arbitrary, but it's a
> universally-agreed arbitrary.  It's how words are ordered in paper
> dictionaries, for example.
> (To be precise, to compare two IntSets, you convert them to lists with
> toList, then compare the lists with lexicographic order.)

I would have used descending order; so it's not *completely* universal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Libraries mailing list