X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FUnique.hs;h=ab3d64718d6f7e8d3b648d316bbf994c6eb35fbd;hb=2b88e86142ffbf79dad8596082ec301627a5682c;hp=55dfa5064e38c037ce6cd42676bb8bbf696d5856;hpb=4efca33ed97059439d1651743e08248b35aba02b;p=ghc-base.git diff --git a/Data/Unique.hs b/Data/Unique.hs index 55dfa50..ab3d647 100644 --- a/Data/Unique.hs +++ b/Data/Unique.hs @@ -27,11 +27,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)