File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ ghci GhciOpts{..} = do
9898 (targets,mainIsTargets,pkgs) <- ghciSetup bopts ghciNoBuild ghciSkipIntermediate ghciMainIs ghciAdditionalPackages
9999 config <- asks getConfig
100100 bconfig <- asks getBuildConfig
101- mainFile <- figureOutMainFile bopts mainIsTargets targets pkgs
102101 wc <- getWhichCompiler
103102 let pkgopts = hidePkgOpt ++ genOpts ++ ghcOpts
104103 hidePkgOpt = if null pkgs || not ghciHidePackages then [] else [" -hide-all-packages" ]
@@ -119,11 +118,12 @@ ghci GhciOpts{..} = do
119118 (" The following GHC options are incompatible with GHCi and have not been passed to it: " <>
120119 T. unwords (map T. pack (nubOrd omittedOpts)))
121120 oiDir <- objectInterfaceDir bconfig
122- let modulesToLoad = nubOrd $
123- concatMap (map display . S. toList . ghciPkgModules) pkgs
124- thingsToLoad =
125- maybe [] (return . toFilePath) mainFile <> modulesToLoad
126- odir =
121+ (modulesToLoad, thingsToLoad) <- if ghciNoLoadModules then return ([] , [] ) else do
122+ mainFile <- figureOutMainFile bopts mainIsTargets targets pkgs
123+ let modulesToLoad = nubOrd $ concatMap (map display . S. toList . ghciPkgModules) pkgs
124+ thingsToLoad = maybe [] (return . toFilePath) mainFile <> modulesToLoad
125+ return (modulesToLoad, thingsToLoad)
126+ let odir =
127127 [ " -odir=" <> toFilePathNoTrailingSep oiDir
128128 , " -hidir=" <> toFilePathNoTrailingSep oiDir ]
129129 $ logInfo
You can’t perform that action at this time.
0 commit comments