[add sempty,union,unions methods to BitSet
John Meacham <john@repetae.net>**20070606055252] hunk ./Util/BitSet.hs 10
+import Data.List(foldl')
hunk ./Util/BitSet.hs 24
+    mconcat ss = foldl' mappend mempty ss
hunk ./Util/BitSet.hs 39
-    BitSet a `disjoint` BitSet b  = ((a .&. b) /= 0)
+    BitSet a `disjoint` BitSet b  = ((a .&. b) == 0)
hunk ./Util/BitSet.hs 41
+    sempty = BitSet 0
+    union (BitSet a) (BitSet b) = BitSet (a .|. b)
+    unions ss = foldl' union sempty ss
hunk ./Util/BitSet.hs 49
-    fromList ts = BitSet (foldl setBit 0 ts)
+    fromList ts = BitSet (foldl' setBit 0 ts)
hunk ./Util/BitSet.hs 54
-    toList (BitSet v) = f 1 where
-        f c | c > 32 = []
-            | otherwise = if v .&. bit c /= 0 then c:f (c + 1) else f (c + 1)
+    toList (BitSet v) = f 0 where
+        f c | c >= 32 = []
+            | otherwise = if testBit v c then c:f (c + 1) else f (c + 1)