diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-20 18:29:14 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-13 02:13:03 -0400 |
commit | bfd0a78cdd0287c26998a4d9419174e4dc305c6f (patch) | |
tree | 7f864f90f4561782929acee2141385c328ab0aa9 /compiler/GHC/Driver | |
parent | ac964c8350ba41082e9dca9cf1b7ff02aea2a636 (diff) | |
download | haskell-bfd0a78cdd0287c26998a4d9419174e4dc305c6f.tar.gz |
Don't return preload units when we set DyNFlags
Preload units can be retrieved in UnitState when needed (i.e. in GHCi)
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r-- | compiler/GHC/Driver/Backpack.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Driver/MakeFile.hs | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs index 95005b405e..f798051a56 100644 --- a/compiler/GHC/Driver/Backpack.hs +++ b/compiler/GHC/Driver/Backpack.hs @@ -203,8 +203,7 @@ withBkpSession cid insts deps session_type do_this = do } )) $ do dflags <- getSessionDynFlags -- pprTrace "flags" (ppr insts <> ppr deps) $ return () - -- Calls initUnits - _ <- setSessionDynFlags dflags + setSessionDynFlags dflags -- calls initUnits do_this withBkpExeSession :: [(Unit, ModRenaming)] -> BkpM a -> BkpM a @@ -392,8 +391,7 @@ addPackage pkg = do { unitDatabasePath = "(in memory " ++ showSDoc dflags (ppr (unitId pkg)) ++ ")" , unitDatabaseUnits = [pkg] } - _ <- GHC.setSessionDynFlags (dflags { unitDatabases = Just (dbs ++ [newdb]) }) - return () + GHC.setSessionDynFlags (dflags { unitDatabases = Just (dbs ++ [newdb]) }) compileInclude :: Int -> (Int, Unit) -> BkpM () compileInclude n (i, uid) = do diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs index 6a50ec483f..78d030b6dd 100644 --- a/compiler/GHC/Driver/MakeFile.hs +++ b/compiler/GHC/Driver/MakeFile.hs @@ -69,7 +69,7 @@ doMkDependHS srcs = do hiSuf = "hi", objectSuf = "o" } - _ <- GHC.setSessionDynFlags dflags + GHC.setSessionDynFlags dflags when (null (depSuffixes dflags)) $ liftIO $ throwGhcExceptionIO (ProgramError "You must specify at least one -dep-suffix") |