[Haskell] [Fwd: Bug in Data.IntSet?]

Arthur van Leeuwen arthurvl at cs.uu.nl
Fri Oct 28 04:15:58 EDT 2005

On 27-okt-2005, at 15:30, Ketil Malde wrote:

> Sigh.  My system insists on rewriting outgoing mail headers, and  
> ghc-users refuses non-subscribers to post there.  I'm too tired to  
> fight this at the moment, so I'll send it here in the hope that it  
> will be picked up by the right adressee.

BTW: I sent a mail to libraries with the attached patch that fixes  
this behaviour.
Note that the problem lies in split not checking to see if the prefix  
of the number
being split on is present in the tree. The patch also fixes the  
on negative numbers, by the way.

Oh, and smaller testcases:

 > Data.IntSet.split 2 $ Data.IntSet.fromList [0,1]
 > Data.IntSet.split 2 $ Data.IntSet.fromList [4,6,8]
 > Data.IntSet.split 1 $ Data.IntSet.fromList [0,-1]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: IntSetFix.patch
Type: application/octet-stream
Size: 2528 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell/attachments/20051028/b8997e29/IntSetFix.obj
-------------- next part --------------

Doei, Arthur. (Who figured this out together with Bertram Felgenhauer)

--   /\    / |       arthurvl at cs.uu.nl       | Work like you don't  
need the money
/__\  /  | A friend is someone with whom | Love like you have never  
been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody  

More information about the Haskell mailing list