Re-port Data.Set union
Closes #26 (closed)
In the Haskell containers library, version 0.5.8.1 switched to a different algorithm (https://github.com/haskell/containers/blob/master/changelog.md). This is a port of that new algorithm for
ptrEq could not be ported, but that is only an optimisation.
Start = quietn 1000000 aStream (\xs ys -> all_member xs ys && all_member_rev xs ys) where all_member :: [Int] [Int] -> Bool all_member xs ys = all (\x -> member x u) (xs ++ ys) where u = union (fromList xs) (fromList ys) all_member_rev :: [Int] [Int] -> Bool all_member_rev xs ys = all (\x -> isMember x xs || isMember x ys) (toList u) where u = union (fromList xs) (fromList ys)
To check the speed I used this, which is equally fast for the old and the new algorithm:
Start = quietn 1000000 aStream prop where prop :: [Int] [Int] -> Bool prop xs ys = size (union (fromList xs) (fromList ys)) >= 0