[project @ 1998-08-14 11:12:32 by sof]
[ghc-hetmet.git] / ghc / compiler / utils / UniqSet.lhs
index 68cf4b6..0c21727 100644 (file)
@@ -8,28 +8,23 @@ Based on @UniqFMs@ (as you would expect).
 Basically, the things need to be in class @Uniquable@.
 
 \begin{code}
-#include "HsVersions.h"
-
 module UniqSet (
-       SYN_IE(UniqSet),    -- abstract type: NOT
+       UniqSet,    -- abstract type: NOT
 
        mkUniqSet, uniqSetToList, emptyUniqSet, unitUniqSet,
-       addOneToUniqSet, addListToUniqSet,
+       addOneToUniqSet, addListToUniqSet, delOneFromUniqSet,
        unionUniqSets, unionManyUniqSets, minusUniqSet,
        elementOfUniqSet, mapUniqSet, intersectUniqSets,
        isEmptyUniqSet, filterUniqSet, sizeUniqSet
     ) where
 
-IMPORT_DELOOPER( SpecLoop )
+#include "HsVersions.h"
+
+import {-# SOURCE #-} Name
 
 import Maybes          ( maybeToBool )
 import UniqFM
-import Unique          ( Unique )
-import SrcLoc          ( SrcLoc )
-import Outputable      ( Outputable(..) )
-import Pretty          ( Doc )
-import PprStyle                ( PprStyle )
-import Util            ( Ord3(..) )
+import Unique          ( Unique, Uniquable(..) )
 
 #if ! OMIT_NATIVE_CODEGEN
 #define IF_NCG(a) a
@@ -68,6 +63,9 @@ mkUniqSet xs = MkUniqSet (listToUFM [ (x, x) | x <- xs])
 addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
 addOneToUniqSet (MkUniqSet set) x = MkUniqSet (addToUFM set x x)
 
+delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
+delOneFromUniqSet (MkUniqSet set) x = MkUniqSet (delFromUFM set x)
+
 addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
 addListToUniqSet (MkUniqSet set) xs = MkUniqSet (addListToUFM set [(x,x) | x<-xs])
 
@@ -112,17 +110,17 @@ mapUniqSet f (MkUniqSet set)
 {-# SPECIALIZE
     addOneToUniqSet :: UniqSet Unique -> Unique -> UniqSet Unique
     #-}
-{-# SPECIALIZE
+{- SPECIALIZE
     elementOfUniqSet :: Name -> UniqSet Name -> Bool
                      , Unique -> UniqSet Unique -> Bool
-    #-}
-{-# SPECIALIZE
+    -}
+{- SPECIALIZE
     mkUniqSet :: [Name] -> UniqSet Name
-    #-}
+    -}
 
-{-# SPECIALIZE
+{- SPECIALIZE
     unitUniqSet :: Name -> UniqSet Name
                 , Unique -> UniqSet Unique
-    #-}
+    -}
 #endif
 \end{code}