Skip to content

Commit 4ea0319

Browse files
Update plugins/default/src/Ide/Plugin/Eval/CodeLens.hs
Co-authored-by: Pepe Iborra <[email protected]>
1 parent 7514f3a commit 4ea0319

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

plugins/default/src/Ide/Plugin/Eval/CodeLens.hs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,14 @@ runEvalCmd lsp state EvalParams {..} = withIndefiniteProgress lsp "Evaluating" C
259259
-- Setup environment for evaluation
260260
hscEnv' <- withSystemTempFile (takeFileName fp) $ \logFilename logHandle -> ExceptT $ (either Left id <$>) . gStrictTry $
261261
-- Right hscEnv' <- liftIO $ withSystemTempFile (takeFileName fp) $ \logFilename logHandle -> (either Left id <$>) . gStrictTry $
262-
evalGhcEnv (hscEnv session) $ do
262+
evalGhcEnv (hscEnvWithImportPaths session) $ do
263263
env <- getSession
264264
dbg "ENV SESSION DFLAGS". ic_dflags . hsc_IC $ env
265265

266266
-- Get options and language flags from module source
267-
df0 <- liftIO $ setupDynFlagsForGHCiLike env $ ms_hspp_opts ms
267+
df <- liftIO $ setupDynFlagsForGHCiLike env $ ms_hspp_opts ms
268268
_ <- setSessionDynFlags df0
269-
dbg "df0 imports" $ importPaths df0
270-
271-
-- We add back the local importPath, so that we can find local dependencies
272-
--let df = df0 {importPaths=[impPath]}
273-
--_lp <- setSessionDynFlags df
274-
df <- modifyFlags (\df -> df {importPaths=[impPath]})
275-
dbg "df imports" $ importPaths df0
276-
--dbg "df" df
269+
dbg "df imports" $ importPaths df
277270

278271
-- property tests need QuickCheck
279272
-- when (needsQuickCheck tests) $ void $ addPackages df ["QuickCheck"]
@@ -691,4 +684,3 @@ Or for a value that does not have a Show instance:
691684
692685
No instance for (Show V)
693686
-}
694-

0 commit comments

Comments
 (0)