X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FUniqSet.lhs;h=5d892fb2e848483fb2e388337b2d75786edb6db1;hb=5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d;hp=9df9fc852a115eb8de72b6b7724c5e1c41517222;hpb=7b0181919416d8f04324575b7e17031ca692f5b0;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/UniqSet.lhs b/ghc/compiler/utils/UniqSet.lhs index 9df9fc8..5d892fb 100644 --- a/ghc/compiler/utils/UniqSet.lhs +++ b/ghc/compiler/utils/UniqSet.lhs @@ -11,7 +11,7 @@ Basically, the things need to be in class @Uniquable@. #include "HsVersions.h" module UniqSet ( - UniqSet(..), -- abstract type: NOT + SYN_IE(UniqSet), -- abstract type: NOT mkUniqSet, uniqSetToList, emptyUniqSet, unitUniqSet, addOneToUniqSet, @@ -20,14 +20,13 @@ module UniqSet ( isEmptyUniqSet ) where -import Ubiq{-uitous-} +IMP_Ubiq(){-uitous-} -import Maybes ( maybeToBool, Maybe ) +import Maybes ( maybeToBool ) import UniqFM import Unique ( Unique ) ---import Outputable ( Outputable(..), ExportFlag ) import SrcLoc ( SrcLoc ) -import Pretty ( Pretty(..), PrettyRep ) +import Pretty ( SYN_IE(Pretty), PrettyRep ) import PprStyle ( PprStyle ) import Util ( Ord3(..) ) @@ -98,52 +97,22 @@ mapUniqSet f (MkUniqSet set) | thing <- eltsUFM set ]) \end{code} -%************************************************************************ -%* * -\subsection{The @IdSet@ and @TyVarSet@ specialisations for sets of Ids/TyVars} -%* * -%************************************************************************ - -@IdSet@ is a specialised version, optimised for sets of Ids. - \begin{code} ---type NameSet = UniqSet Name ---type GenTyVarSet flexi = UniqSet (GenTyVar flexi) ---type GenIdSet ty = UniqSet (GenId ty) - -#if ! OMIT_NATIVE_CODEGEN ---type RegSet = UniqSet Reg -#endif - -#if 0 #if __GLASGOW_HASKELL__ {-# SPECIALIZE - unitUniqSet :: GenId ty -> GenIdSet ty, - GenTyVar flexi -> GenTyVarSet flexi, - Name -> NameSet - IF_NCG(COMMA Reg -> RegSet) + addOneToUniqSet :: UniqSet Unique -> Unique -> UniqSet Unique #-} - {-# SPECIALIZE - mkUniqSet :: [GenId ty] -> GenIdSet ty, - [GenTyVar flexi] -> GenTyVarSet flexi, - [Name] -> NameSet - IF_NCG(COMMA [Reg] -> RegSet) + elementOfUniqSet :: RnName -> UniqSet RnName -> Bool + , Unique -> UniqSet Unique -> Bool #-} - {-# SPECIALIZE - elementOfUniqSet :: GenId ty -> GenIdSet ty -> Bool, - GenTyVar flexi -> GenTyVarSet flexi -> Bool, - Name -> NameSet -> Bool - IF_NCG(COMMA Reg -> RegSet -> Bool) + mkUniqSet :: [RnName] -> UniqSet RnName #-} {-# SPECIALIZE - mapUniqSet :: (GenId ty -> GenId ty) -> GenIdSet ty -> GenIdSet ty, - (GenTyVar flexi -> GenTyVar flexi) -> GenTyVarSet flexi -> GenTyVarSet flexi, - (Name -> Name) -> NameSet -> NameSet - IF_NCG(COMMA (Reg -> Reg) -> RegSet -> RegSet) + unitUniqSet :: RnName -> UniqSet RnName + , Unique -> UniqSet Unique #-} #endif -#endif \end{code}