Buglet in Data.IntSet.split and Data.IntSet.splitMember, patch included.

Jean-Philippe Bernardy jeanphilippe.bernardy at gmail.com
Sun Oct 30 12:08:52 EST 2005


On 10/27/05, Arthur van Leeuwen <arthurvl at cs.uu.nl> wrote:
> Hello mailinglist-members,
> so Bertram Felgenhauer (int-e at gmx.de) and I set out to fix that, noting
> along the way that Data.IntSet.splitMember was broken as well, and
> that negative numbers were not handled correctly either. The following
> patch fixes the problems:

Note that 'fold' and other functions derived from it are also behaving
strangely when
presented negative numbers. Basically they are treated as unsigned.
IntSet and IntMap were never designed to suport those, I think.

On the other hand, I assume that no one relies on that 'strange'
behaviour... which is not documented. If no one objects, I'll change
that . Note that this involves a small performance penalty.


More information about the Libraries mailing list