summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-06-22 19:03:29 +0100
committerIan Lynagh <igloo@earth.li>2012-06-22 19:03:29 +0100
commit2d58640243808525d1b42f1184aed7b62bfb4eaa (patch)
tree8e76c9703a80661fef9dc142fab0d4aac19503cf /compiler/utils
parent63efe3550a1d5a63846825f3ee7f5aeed3e4427a (diff)
downloadhaskell-2d58640243808525d1b42f1184aed7b62bfb4eaa.tar.gz
Remove an unused function
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/ListSetOps.lhs20
1 files changed, 0 insertions, 20 deletions
diff --git a/compiler/utils/ListSetOps.lhs b/compiler/utils/ListSetOps.lhs
index 0dc873eb62..06768bfbfb 100644
--- a/compiler/utils/ListSetOps.lhs
+++ b/compiler/utils/ListSetOps.lhs
@@ -17,10 +17,6 @@ module ListSetOps (
-- Duplicate handling
hasNoDups, runs, removeDups, findDupsEq,
equivClasses, equivClassesByUniq,
-
- -- Remove redudant elts
- removeRedundant -- Used in the ghc/InteractiveUI,
- -- although not in the compiler itself
) where
#include "HsVersions.h"
@@ -212,22 +208,6 @@ findDupsEq _ [] = []
findDupsEq eq (x:xs) | null eq_xs = findDupsEq eq xs
| otherwise = (x:eq_xs) : findDupsEq eq neq_xs
where (eq_xs, neq_xs) = partition (eq x) xs
-
-removeRedundant :: (a -> a -> Bool) -- True <=> discard the *second* argument
- -> [a] -> [a]
--- Remove any element y for which
--- another element x is in the list
--- and (x `subsumes` y)
--- Preserves order
-removeRedundant subsumes xs
- = WARN( length xs > 10, text "removeRedundant" <+> int (length xs) )
- -- This is a quadratic algorithm :-) so warn if the list gets long
- go [] xs
- where
- go acc [] = reverse acc
- go acc (x:xs)
- | any (`subsumes` x) acc = go acc xs
- | otherwise = go (x : filterOut (x `subsumes`) acc) xs
\end{code}