Use OPTIONS rather than OPTIONS_GHC for pragmas
[ghc-hetmet.git] / compiler / basicTypes / Unique.lhs
index 058b0be..15cf350 100644 (file)
@@ -16,6 +16,13 @@ Some of the other hair in this code is to be able to use a
 Haskell).
 
 \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 Unique (
        Unique, Uniquable(..), hasKey,
 
@@ -54,7 +61,6 @@ import BasicTypes
 import PackageConfig
 import FastString
 import Outputable
-import FastTypes
 
 import GHC.Exts
 import Data.Char       ( chr, ord )
@@ -120,25 +126,15 @@ i2w_s x = (x::Int#)
 mkUnique (C# c) (I# i)
   = MkUnique (w2i (tag `or#` bits))
   where
-#if __GLASGOW_HASKELL__ >= 503
     tag  = i2w (ord# c) `uncheckedShiftL#` i2w_s 24#
-#else
-    tag  = i2w (ord# c) `shiftL#` i2w_s 24#
-#endif
     bits = i2w i `and#` (i2w 16777215#){-``0x00ffffff''-}
 
 unpkUnique (MkUnique u)
   = let
-       tag = C# (chr# (w2i ((i2w u) `shiftr` (i2w_s 24#))))
+       tag = C# (chr# (w2i ((i2w u) `uncheckedShiftRL#` (i2w_s 24#))))
        i   = I# (w2i ((i2w u) `and#` (i2w 16777215#){-``0x00ffffff''-}))
     in
     (tag, i)
-  where
-#if __GLASGOW_HASKELL__ >= 503
-    shiftr x y = uncheckedShiftRL# x y
-#else
-    shiftr x y = shiftRL# x y
-#endif
 \end{code}