[project @ 1997-08-25 22:24:51 by sof]
[ghc-hetmet.git] / ghc / compiler / utils / UniqFM.lhs
index 2967032..3ce6713 100644 (file)
@@ -11,17 +11,10 @@ Basically, the things need to be in class @Uniquable@, and we use the
 (A similar thing to @UniqSet@, as opposed to @Set@.)
 
 \begin{code}
-#if defined(COMPILING_GHC)
 #include "HsVersions.h"
-#define IF_NOT_GHC(a) {--}
-#else
-#define ASSERT(e) {--}
-#define IF_NOT_GHC(a) a
-#endif
 
 module UniqFM (
        UniqFM,   -- abstract type
-       Uniquable(..), -- class to go with it
 
        emptyUFM,
        unitUFM,
@@ -39,8 +32,8 @@ module UniqFM (
        plusUFM_C,
        minusUFM,
        intersectUFM,
-       IF_NOT_GHC(intersectUFM_C COMMA)
-       IF_NOT_GHC(foldUFM COMMA)
+       intersectUFM_C,
+       foldUFM,
        mapUFM,
        filterUFM,
        sizeUFM,
@@ -49,17 +42,18 @@ module UniqFM (
        lookupWithDefaultUFM, lookupWithDefaultUFM_Directly,
        eltsUFM, keysUFM,
        ufmToList
-#if defined(COMPILING_GHC)
        ,FAST_STRING
-#endif
     ) where
 
-#if defined(COMPILING_GHC)
+IMP_Ubiq()
+
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
 IMPORT_DELOOPER( SpecLoop )
+#else
+import {-# SOURCE #-} Name
 #endif
-IMP_Ubiq()
 
-import Unique          ( Unique, u2i, mkUniqueGrimily )
+import Unique          ( Uniquable(..), Unique, u2i, mkUniqueGrimily )
 import Util
 import Pretty          ( Doc )
 import Outputable      ( PprStyle, Outputable(..) )
@@ -202,9 +196,6 @@ data UniqFM ele
            (UniqFM ele)
            (UniqFM ele)
 
-class Uniquable a where
-    uniqueOf :: a -> Unique
-
 -- for debugging only :-)
 {-
 instance Text (UniqFM a) where