projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Write the thunk 'next' to the MVar
[ghc-base.git]
/
Data
/
Unique.hs
diff --git
a/Data/Unique.hs
b/Data/Unique.hs
index
38c8e48
..
55dfa50
100644
(file)
--- a/
Data/Unique.hs
+++ b/
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