[Git][ghc/ghc][wip/romes/graph-compact-easy] Fix
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Tue Dec 3 13:56:08 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC
Commits:
04fa9b90 by Rodrigo Mesquita at 2024-12-03T13:55:56+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
@@ -143,7 +143,7 @@ import GHC.Utils.Exception as Exception hiding (catch, mask, handle)
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 +4494,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/04fa9b901df5a7531d358010787d80c6b9b8e39b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/04fa9b901df5a7531d358010787d80c6b9b8e39b
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/0df7a610/attachment-0001.html>
More information about the ghc-commits
mailing list