summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Config/Parser.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-05-27 10:11:04 +0200
committerSylvain Henry <sylvain@haskus.fr>2021-06-07 11:19:35 +0200
commit3a90814fdf5800927ef404d46459223b2ba283ce (patch)
tree134e63fcfb5dd5d4bf4f6182dc180cd370f4759f /compiler/GHC/Driver/Config/Parser.hs
parent4dc681c7c0345ee8ae268749d98b419dabf6a3bc (diff)
downloadhaskell-3a90814fdf5800927ef404d46459223b2ba283ce.tar.gz
Parser: make less DynFlags dependent
This is an attempt at reducing the number of dependencies of the Parser (as reported by CountParserDeps). Modules in GHC.Parser.* don't import GHC.Driver.Session directly anymore. Sadly some GHC.Driver.* modules are still transitively imported and the number of dependencies didn't decrease. But it's a step in the right direction.
Diffstat (limited to 'compiler/GHC/Driver/Config/Parser.hs')
-rw-r--r--compiler/GHC/Driver/Config/Parser.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Config/Parser.hs b/compiler/GHC/Driver/Config/Parser.hs
index bc4c589bf8..335e1d530e 100644
--- a/compiler/GHC/Driver/Config/Parser.hs
+++ b/compiler/GHC/Driver/Config/Parser.hs
@@ -4,6 +4,7 @@ module GHC.Driver.Config.Parser
where
import GHC.Prelude
+import GHC.Platform
import GHC.Driver.Session
import GHC.Utils.Error
@@ -17,6 +18,7 @@ initParserOpts =
<$> warningFlags
<*> extensionFlags
<*> mkPlainMsgEnvelope
+ <*> (supportedLanguagesAndExtensions . platformArchOS . targetPlatform)
<*> safeImportsOn
<*> gopt Opt_Haddock
<*> gopt Opt_KeepRawTokenStream