From 3be6a230b5b26eda562b1046357d32dcceb83158 Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 4 Feb 2002 13:54:53 +0000 Subject: [PATCH] [project @ 2002-02-04 13:54:53 by sewardj] Expand out use of modifyIORef because 4.08.2 doesn't have that. --- ghc/compiler/main/HscMain.lhs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 9bf5b10..60c6332 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -84,7 +84,7 @@ import Name ( Name, nameModule, nameOccName, getName, isGlobalName ) import NameEnv ( emptyNameEnv, mkNameEnv ) import Module ( Module ) -import IOExts ( newIORef, readIORef, writeIORef, modifyIORef, +import IOExts ( newIORef, readIORef, writeIORef, unsafePerformIO ) import Monad ( when ) @@ -351,7 +351,8 @@ hscRecomp ghci_mode dflags have_object -- ...and add the string to the headers requested via command line -- options -- - ; modifyIORef v_HCHeader (++ foreign_headers) + ; fhdrs <- readIORef v_HCHeader + ; writeIORef v_HCHeader (fhdrs ++ foreign_headers) ; imported_modules <- mapM mod_name_to_Module imported_module_names -- 1.7.10.4