summaryrefslogtreecommitdiff
path: root/compiler/utils/Util.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-01-27 16:20:54 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-01-28 13:54:58 -0800
commit07ee96faac4996cde0ab82789eec0b70d1a35af0 (patch)
tree1a36efc948d7634a95734d0c527286a5070f4c76 /compiler/utils/Util.hs
parent276da7929c187f007c198a38e88bdad91866e500 (diff)
downloadhaskell-07ee96faac4996cde0ab82789eec0b70d1a35af0.tar.gz
Use strict atomicModifyIORef' (added in GHC 7.6).
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D635
Diffstat (limited to 'compiler/utils/Util.hs')
-rw-r--r--compiler/utils/Util.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs
index a1dacb45e5..ddcfe1117b 100644
--- a/compiler/utils/Util.hs
+++ b/compiler/utils/Util.hs
@@ -107,7 +107,7 @@ import Exception
import Panic
import Data.Data
-import Data.IORef ( IORef, newIORef, atomicModifyIORef )
+import Data.IORef ( IORef, newIORef, atomicModifyIORef' )
import System.IO.Unsafe ( unsafePerformIO )
import Data.List hiding (group)
@@ -808,7 +808,7 @@ global a = unsafePerformIO (newIORef a)
consIORef :: IORef [a] -> a -> IO ()
consIORef var x = do
- atomicModifyIORef var (\xs -> (x:xs,()))
+ atomicModifyIORef' var (\xs -> (x:xs,()))
globalM :: IO a -> IORef a
globalM ma = unsafePerformIO (ma >>= newIORef)