projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab84635
)
add Typeable instance
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 4 May 2010 15:28:15 +0000
(15:28 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 4 May 2010 15:28:15 +0000
(15:28 +0000)
Data/Unique.hs
patch
|
blob
|
history
diff --git
a/Data/Unique.hs
b/Data/Unique.hs
index
55dfa50
..
ab3d647
100644
(file)
--- 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)