summaryrefslogtreecommitdiff
path: root/compiler/iface/IfaceEnv.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/iface/IfaceEnv.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/iface/IfaceEnv.hs')
-rw-r--r--compiler/iface/IfaceEnv.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/iface/IfaceEnv.hs b/compiler/iface/IfaceEnv.hs
index efd4956b70..f647e35707 100644
--- a/compiler/iface/IfaceEnv.hs
+++ b/compiler/iface/IfaceEnv.hs
@@ -34,9 +34,8 @@ import SrcLoc
import Util
import Outputable
-import Exception ( evaluate )
-import Data.IORef ( atomicModifyIORef, readIORef )
+import Data.IORef ( atomicModifyIORef' )
{-
*********************************************************
@@ -233,9 +232,7 @@ newtype NameCacheUpdater = NCU { updateNameCache :: forall c. (NameCache -> (Nam
mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater
mkNameCacheUpdater = do
nc_var <- hsc_NC `fmap` getTopEnv
- let update_nc f = do r <- atomicModifyIORef nc_var f
- _ <- evaluate =<< readIORef nc_var
- return r
+ let update_nc f = atomicModifyIORef' nc_var f
return (NCU update_nc)
initNameCache :: UniqSupply -> [Name] -> NameCache