add GHC.HetMet.{hetmet_kappa,hetmet_kappa_app}
[ghc-base.git] / Data / Unique.hs
index 55dfa50..c4c8827 100644 (file)
@@ -1,3 +1,9 @@
+{-# LANGUAGE CPP #-}
+
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE MagicHash, DeriveDataTypeable #-}
+#endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Unique
@@ -27,11 +33,16 @@ import System.IO.Unsafe (unsafePerformIO)
 import GHC.Base
 import GHC.Num
 import GHC.Conc
+import Data.Typeable
 #endif
 
 -- | An abstract unique object.  Objects of type 'Unique' may be
 -- compared for equality and ordering and hashed into 'Int'.
-newtype Unique = Unique Integer deriving (Eq,Ord)
+newtype Unique = Unique Integer deriving (Eq,Ord
+#ifdef __GLASGOW_HASKELL__
+   ,Typeable
+#endif
+   )
 
 uniqSource :: TVar Integer
 uniqSource = unsafePerformIO (newTVarIO 0)