
Hi all, Can someone familiar with Data.IntSet please look into http://hackage.haskell.org/trac/ghc/ticket/1762 wrong result of isProperSubsetOf IntSet.isProperSubsetOf (IntSet.fromList [2,3]) (IntSet.fromList [1,2,3]) is evaluated to False, but should be True. Thanks Ian

I think I have a fix for this bug. I'll use darcs to send a patch, as soon as I'm done checking out the repo. Here's the change that I think fixes the problem: subsetCmp t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2) | shorter m1 m2 = GT - | shorter m2 m1 = subsetCmpLt + | shorter m2 m1 = case subsetCmpLt of + GT -> GT + _ -> LT | p1 == p2 = subsetCmpEq | otherwise = GT -- disjoint I also intend to send a QuickCheck that catches this bug, and some comments to the IntSet sourcecode.
participants (2)
-
David Benbennick
-
Ian Lynagh