summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/Data/Unique.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Data/Unique.hs b/libraries/base/Data/Unique.hs
index 38c8e483bb..55dfa5064e 100644
--- a/libraries/base/Data/Unique.hs
+++ b/libraries/base/Data/Unique.hs
@@ -45,7 +45,7 @@ newUnique :: IO Unique
newUnique = atomically $ do
val <- readTVar uniqSource
let next = val+1
- writeTVar uniqSource $! val + 1
+ writeTVar uniqSource $! next
return (Unique next)
-- SDM (18/3/2010): changed from MVar to STM. This fixes