X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FUniqFM.lhs;h=e78d73119995f60f02397a5dec28c087a89c4226;hp=2a02dc728d5e0437333bdcbef39c939d263ce61e;hb=ad94d40948668032189ad22a0ad741ac1f645f50;hpb=49e265f1e3e1aef2f0d7b8f25eb50e268b16c8cc diff --git a/compiler/utils/UniqFM.lhs b/compiler/utils/UniqFM.lhs index 2a02dc7..e78d731 100644 --- a/compiler/utils/UniqFM.lhs +++ b/compiler/utils/UniqFM.lhs @@ -1,7 +1,9 @@ -%ilter +% +% (c) The University of Glasgow 2006 % (c) The AQUA Project, Glasgow University, 1994-1998 % -\section[UniqFM]{Specialised finite maps, for things with @Uniques@} + +UniqFM: Specialised finite maps, for things with @Uniques@ Based on @FiniteMaps@ (as you would expect). @@ -11,6 +13,13 @@ Basically, the things need to be in class @Uniquable@, and we use the (A similar thing to @UniqSet@, as opposed to @Set@.) \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- for details + module UniqFM ( UniqFM, -- abstract type @@ -52,7 +61,7 @@ import Maybes ( maybeToBool ) import FastTypes import Outputable -import GLAEXTS -- Lots of Int# operations +import GHC.Exts -- Lots of Int# operations \end{code} %************************************************************************ @@ -825,18 +834,8 @@ 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 +shiftR_ n p = word2Int#((int2Word# n) `uncheckedShiftRL#` p) #else /* not GHC */ shiftL_ n p = n * (2 ^ p)