[project @ 2001-12-13 10:47:28 by sewardj]
[ghc-hetmet.git] / ghc / compiler / utils / UniqFM.lhs
index 124d6be..475d418 100644 (file)
@@ -117,7 +117,7 @@ lookupWithDefaultUFM
 lookupWithDefaultUFM_Directly
                :: UniqFM elt -> elt -> Unique -> elt
 
-keysUFM                :: UniqFM elt -> [Int]          -- Get the keys
+keysUFM                :: UniqFM elt -> [Unique]       -- Get the keys
 eltsUFM                :: UniqFM elt -> [elt]
 ufmToList      :: UniqFM elt -> [(Unique, elt)]
 \end{code}
@@ -579,7 +579,7 @@ eltsUFM fm = foldUFM (:) [] fm
 
 ufmToList fm = fold_tree (\ iu elt rest -> (mkUniqueGrimily iu, elt) : rest) [] fm
 
-keysUFM fm = fold_tree (\ iu elt rest -> iBox iu : rest) [] fm
+keysUFM fm = fold_tree (\ iu elt rest -> mkUniqueGrimily iu : rest) [] fm
 
 fold_tree f a (NodeUFM _ _ t1 t2) = fold_tree f (fold_tree f a t2) t1
 fold_tree f a (LeafUFM iu obj)    = f iu obj a
@@ -800,10 +800,18 @@ shiftR_ :: FastInt -> FastInt -> FastInt
 #if __GLASGOW_HASKELL__
 {-# INLINE shiftL_ #-}
 {-# INLINE shiftR_ #-}
+#if __GLASGOW_HASKELL__ >= 503
+shiftL_ n p = word2Int#((int2Word# n) `uncheckedShiftL#` p)
+#else
 shiftL_ n p = word2Int#((int2Word# n) `shiftL#` p)
+#endif
 shiftR_ n p = word2Int#((int2Word# n) `shiftr` p)
   where
+#if __GLASGOW_HASKELL__ >= 503
+    shiftr x y = uncheckedShiftRL# x y
+#else
     shiftr x y = shiftRL# x y
+#endif
 
 #else {- not GHC -}
 shiftL_ n p = n * (2 ^ p)