projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
001b9a4
)
Bleat a bit more informatively in unionLists
author
simonpj@microsoft.com
<unknown>
Wed, 26 Jan 2011 17:10:30 +0000
(17:10 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 26 Jan 2011 17:10:30 +0000
(17:10 +0000)
compiler/utils/ListSetOps.lhs
patch
|
blob
|
history
diff --git
a/compiler/utils/ListSetOps.lhs
b/compiler/utils/ListSetOps.lhs
index
f5e0eae
..
83334fb
100644
(file)
--- a/
compiler/utils/ListSetOps.lhs
+++ b/
compiler/utils/ListSetOps.lhs
@@
-19,6
+19,8
@@
module ListSetOps (
) where
) where
+#include "HsVersions.h"
+
import Outputable
import Unique
import UniqFM
import Outputable
import Unique
import UniqFM
@@
-41,9
+43,11
@@
insertList :: Eq a => a -> [a] -> [a]
insertList x xs | isIn "insert" x xs = xs
| otherwise = x : xs
insertList x xs | isIn "insert" x xs = xs
| otherwise = x : xs
-unionLists :: (Eq a) => [a] -> [a] -> [a]
+unionLists :: (Outputable a, Eq a) => [a] -> [a] -> [a]
-- Assumes that the arguments contain no duplicates
-- Assumes that the arguments contain no duplicates
-unionLists xs ys = [x | x <- xs, isn'tIn "unionLists" x ys] ++ ys
+unionLists xs ys
+ = WARN(length xs > 100 || length ys > 100, ppr xs $$ ppr ys)
+ [x | x <- xs, isn'tIn "unionLists" x ys] ++ ys
minusList :: (Eq a) => [a] -> [a] -> [a]
-- Everything in the first list that is not in the second list:
minusList :: (Eq a) => [a] -> [a] -> [a]
-- Everything in the first list that is not in the second list: