summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2023-04-15 12:58:51 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-16 18:12:59 -0400
commita1371ebb53a8206d6d99ac0d9bff4ed8a3043498 (patch)
tree322979dce612a6013c4016a016b292766646d5d1
parent3b0ea4809d92581a10e0e501a6fbd7339e8922bf (diff)
downloadhaskell-a1371ebb53a8206d6d99ac0d9bff4ed8a3043498.tar.gz
Add import lists to few GHC.Driver.Session imports
Related to https://gitlab.haskell.org/ghc/ghc/-/issues/23261. There are a lot of GHC.Driver.Session which only use DynFlags, but not the parsing code.
-rw-r--r--compiler/GHC/Driver/Errors/Types.hs3
-rw-r--r--compiler/GHC/Hs/Pat.hs2
-rw-r--r--compiler/GHC/HsToCore/Errors/Types.hs3
-rw-r--r--compiler/GHC/Tc/Types/Constraint.hs2
4 files changed, 6 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Errors/Types.hs b/compiler/GHC/Driver/Errors/Types.hs
index 10127a8d6c..c2ec9cbb0c 100644
--- a/compiler/GHC/Driver/Errors/Types.hs
+++ b/compiler/GHC/Driver/Errors/Types.hs
@@ -25,7 +25,8 @@ import GHC.Prelude
import Data.Bifunctor
import Data.Typeable
-import GHC.Driver.Session
+import GHC.Driver.Session (DynFlags, PackageArg, gopt)
+import GHC.Driver.Flags (GeneralFlag (Opt_BuildingCabalPackage))
import GHC.Types.Error
import GHC.Unit.Module
import GHC.Unit.State
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 2591efc732..3a40d15514 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -82,7 +82,7 @@ import GHC.Types.SrcLoc
import GHC.Data.Bag -- collect ev vars from pats
import GHC.Data.Maybe
import GHC.Types.Name (Name, dataName)
-import GHC.Driver.Session
+import GHC.Driver.Session (DynFlags, xopt)
import qualified GHC.LanguageExtensions as LangExt
import Data.Data
diff --git a/compiler/GHC/HsToCore/Errors/Types.hs b/compiler/GHC/HsToCore/Errors/Types.hs
index 40fd6b7aab..b91a60e437 100644
--- a/compiler/GHC/HsToCore/Errors/Types.hs
+++ b/compiler/GHC/HsToCore/Errors/Types.hs
@@ -9,7 +9,8 @@ import GHC.Prelude
import GHC.Core (CoreRule, CoreExpr, RuleName)
import GHC.Core.DataCon
import GHC.Core.Type
-import GHC.Driver.Session
+import GHC.Driver.Session (DynFlags, xopt)
+import GHC.Driver.Flags (WarningFlag)
import GHC.Hs
import GHC.HsToCore.Pmc.Solver.Types
import GHC.Types.Basic (Activation)
diff --git a/compiler/GHC/Tc/Types/Constraint.hs b/compiler/GHC/Tc/Types/Constraint.hs
index 4814c63280..6fc6b235c4 100644
--- a/compiler/GHC/Tc/Types/Constraint.hs
+++ b/compiler/GHC/Tc/Types/Constraint.hs
@@ -117,7 +117,7 @@ import GHC.Core
import GHC.Core.TyCo.Ppr
import GHC.Utils.FV
import GHC.Types.Var.Set
-import GHC.Driver.Session
+import GHC.Driver.Session (DynFlags(reductionDepth))
import GHC.Types.Basic
import GHC.Types.Unique
import GHC.Types.Unique.Set