Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/2d58640243808525d1b42f1184aed7b62bfb4eaa >--------------------------------------------------------------- commit 2d58640243808525d1b42f1184aed7b62bfb4eaa Author: Ian Lynagh <[email protected]> Date: Fri Jun 22 19:03:29 2012 +0100 Remove an unused function >--------------------------------------------------------------- compiler/utils/ListSetOps.lhs | 20 -------------------- 1 files changed, 0 insertions(+), 20 deletions(-) diff --git a/compiler/utils/ListSetOps.lhs b/compiler/utils/ListSetOps.lhs index 0dc873e..06768bf 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} _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
