X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FListSetOps.lhs;h=3b42040d178010b4b029e23a4cd628ed1067dc8a;hb=f0a01a1fc19bfa76aa36fa113942e1c57f3733f4;hp=dfa2cd023f67bec16d96c98e6eb73c0768ef77f7;hpb=9dd6e1c216993624a2cd74b62ca0f0569c02c26b;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/ListSetOps.lhs b/ghc/compiler/utils/ListSetOps.lhs index dfa2cd0..3b42040 100644 --- a/ghc/compiler/utils/ListSetOps.lhs +++ b/ghc/compiler/utils/ListSetOps.lhs @@ -1,5 +1,5 @@ % -% (c) The GRASP/AQUA Project, Glasgow University, 1992-1995 +% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % \section[ListSetOps]{Set-like operations on lists} @@ -13,36 +13,13 @@ module ListSetOps ( #include "HsVersions.h" -import Util ( isIn, isn'tIn ) +import Util ( isn'tIn ) import List ( union ) \end{code} \begin{code} unionLists :: (Eq a) => [a] -> [a] -> [a] -#ifdef REALLY_HASKELL_1_3 unionLists = union -#else -unionLists [] [] = [] -unionLists [] b = b -unionLists a [] = a -unionLists (a:as) b - | a `is_elem` b = unionLists as b - | otherwise = a : unionLists as b - where - is_elem = isIn "unionLists" -#endif - -{- UNUSED -intersectLists :: (Eq a) => [a] -> [a] -> [a] -intersectLists [] [] = [] -intersectLists [] b = [] -intersectLists a [] = [] -intersectLists (a:as) b - | a `is_elem` b = a : intersectLists as b - | otherwise = intersectLists as b - where - is_elem = isIn "intersectLists" --} \end{code} Everything in the first list that is not in the second list: