[Git][ghc/ghc][wip/romes/graph-compact-easy] Fix
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Tue Dec 3 13:55:40 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC
Commits:
ef610144 by Rodrigo Mesquita at 2024-12-03T13:55:27+00:00
Fix
- - - - -
2 changed files:
- ghc/GHCi/Leak.hs
- ghc/GHCi/UI.hs
Changes:
=====================================
ghc/GHCi/Leak.hs
=====================================
@@ -7,6 +7,7 @@ module GHCi.Leak
import Control.Monad
import Data.Bits
+import Data.IORef
import Foreign.Ptr (ptrToIntPtr, intPtrToPtr)
import GHC
import GHC.Ptr (Ptr (..))
@@ -16,6 +17,7 @@ import GHC.Driver.Ppr
import GHC.Utils.Outputable
import GHC.Unit.Module.ModDetails
import GHC.Unit.Home.ModInfo
+import GHC.Unit.Home.PackageTable
import GHC.Platform (target32Bit)
import GHC.Linker.Types
import Prelude
=====================================
ghc/GHCi/UI.hs
=====================================
@@ -53,7 +53,7 @@ import GHC.Driver.Phases
import GHC.Driver.Session as DynFlags
import GHC.Driver.Ppr hiding (printForUser)
import GHC.Utils.Error hiding (traceCmd)
-import GHC.Driver.Monad ( modifySession )
+import GHC.Driver.Monad ( modifySession, modifySessionM )
import GHC.Driver.Make ( newIfaceCache, ModIfaceCache(..) )
import GHC.Driver.Config.Parser (initParserOpts)
import GHC.Driver.Config.Diagnostic
@@ -144,6 +144,7 @@ import Foreign hiding (void)
import GHC.Stack hiding (SrcLoc(..))
import GHC.Unit.Env
import GHC.Unit.Home.ModInfo
+import GHC.Unit.Home.PackageTable
import System.Directory
import System.Environment
@@ -4494,7 +4495,7 @@ discardInterfaceCache =
clearHPTs :: GhciMonad m => m ()
clearHPTs = do
- let pruneHomeUnitEnv hme = do
+ let pruneHomeUnitEnv hme = liftIO $ do
emptyHpt <- newHomePackageTable
pure hme{ homeUnitEnv_hpt = emptyHpt }
discardMG hsc = hsc { hsc_mod_graph = GHC.emptyMG }
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ef6101447a4da91fadec588ec877d0b584a33301
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ef6101447a4da91fadec588ec877d0b584a33301
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241203/d18af59d/attachment-0001.html>
More information about the ghc-commits
mailing list