Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch :
http://hackage.haskell.org/trac/ghc/changeset/226f2caf78961057de46edebf198661be8ddcc4d >--------------------------------------------------------------- commit 226f2caf78961057de46edebf198661be8ddcc4d Author: David Terei <[email protected]> Date: Thu Jun 9 17:43:36 2011 -0700 SafeHaskell: Restore comment although we don't know what it means. Comment was removed as I thought it was incorrect now with code changes but Simon M thinks my interpretation of the comment was incorrect. He isn't sure what the comment is refereeing to either though! So have restored comment and created trac #5249 to track fixing this at some point. >--------------------------------------------------------------- compiler/main/GHC.hs | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 1c9a891..c8ca482 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -928,7 +928,14 @@ getModuleInfo mdl = withSession $ \hsc_env -> do let mg = hsc_mod_graph hsc_env if mdl `elem` map ms_mod mg then liftIO $ getHomeModuleInfo hsc_env mdl - else liftIO $ getPackageModuleInfo hsc_env mdl + else do + {- if isHomeModule (hsc_dflags hsc_env) mdl + then return Nothing + else -} liftIO $ getPackageModuleInfo hsc_env mdl + -- getPackageModuleInfo will attempt to find the interface, so + -- we don't want to call it for a home module, just in case there + -- was a problem loading the module and the interface doesn't + -- exist... hence the isHomeModule test here. (ToDo: reinstate) getPackageModuleInfo :: HscEnv -> Module -> IO (Maybe ModuleInfo) #ifdef GHCI _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
