Skip to content

Commit

Permalink
Fix eval plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Nov 22, 2023
1 parent 7ab7b45 commit 0a1efdb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/hls-eval-plugin/src/Ide/Plugin/Eval/CodeLens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ import GHC (ClsInst,
exprType,
getInfo,
getInteractiveDynFlags,
#if MIN_VERSION_ghc(9,3,0)
setUnitDynFlags,
#endif
isImport, isStmt,
parseName,
pprFamInst,
Expand Down Expand Up @@ -465,7 +468,11 @@ evals mark_exception (st, fp) df stmts = do
<> T.pack (intercalate ", " $ map SrcLoc.unLoc ignoreds)
]
dbg "post set" $ showDynFlags df'
#if MIN_VERSION_ghc(9,3,0)
_ <- setUnitDynFlags (homeUnitId_ df') df'
#else
_ <- setSessionDynFlags df'
#endif
sessDyns <- getSessionDynFlags
setInteractiveDynFlags sessDyns
pure $ warnings <> igns
Expand Down

0 comments on commit 0a1efdb

Please sign in to comment.