Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/66fa1886769c9e4b7aec4d278a797538a6220ced

>---------------------------------------------------------------

commit 66fa1886769c9e4b7aec4d278a797538a6220ced
Author: Daniel Vainsencher <daniel.vainsenc...@gmail.com>
Date:   Thu Dec 13 18:19:43 2012 +0000

    Likely fix to uninitialized DynFlags in plugins.

>---------------------------------------------------------------

 compiler/simplCore/CoreMonad.lhs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index c2c2650..5726cf5 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -922,8 +922,11 @@ argument to the plugin function so that we can turn this 
function into
 reinitializeGlobals :: CoreM ()
 reinitializeGlobals = do
     (sf_globals, linker_globals) <- read cr_globals
+    hsc_env <- getHscEnv
+    let dflags = hsc_dflags hsc_env
     liftIO $ restoreStaticFlagGlobals sf_globals
     liftIO $ restoreLinkerGlobals linker_globals
+    liftIO $ setUnsafeGlobalDynFlags dflags
 \end{code}
 
 %************************************************************************



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to