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:
4a47541
)
Write the thunk 'next' to the MVar
author
Bas van Dijk
<v.dijk.bas@gmail.com>
Fri, 19 Mar 2010 12:59:51 +0000
(12:59 +0000)
committer
Bas van Dijk
<v.dijk.bas@gmail.com>
Fri, 19 Mar 2010 12:59:51 +0000
(12:59 +0000)
Data/Unique.hs
patch
|
blob
|
history
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