X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnNames.lhs;h=253d262fcf40271789e7200d031e6e71a6cea635;hp=70150ca45ccca6d4db20a79a64d2a9cda369af40;hb=3c22606bf3114747deeae0a8a1d5832ee834d9d1;hpb=d55443e6ab108ae0570bd92dc19de09b07b4ebfa diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 70150ca..253d262 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -13,7 +13,7 @@ module RnNames ( #include "HsVersions.h" -import DynFlags ( DynFlag(..), GhcMode(..), DynFlags(..) ) +import DynFlags import HsSyn ( IE(..), ieName, ImportDecl(..), LImportDecl, ForeignDecl(..), HsGroup(..), HsValBinds(..), Sig(..), collectHsBindLocatedBinders, tyClDeclNames, @@ -708,10 +708,10 @@ rnExports explicit_mod exports -- written "module Main where ..." -- Reason: don't want to complain about 'main' not in scope -- in interactive mode - ; ghc_mode <- getGhcMode + ; dflags <- getDOpts ; let real_exports - | explicit_mod = exports - | ghc_mode == Interactive = Nothing + | explicit_mod = exports + | ghcLink dflags == LinkInMemory = Nothing | otherwise = Just ([noLoc (IEVar main_RDR_Unqual)]) -- ToDo: the 'noLoc' here is unhelpful if 'main' -- turns out to be out of scope