summaryrefslogtreecommitdiff
path: root/testsuite/tests
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 /testsuite/tests
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 'testsuite/tests')
-rw-r--r--testsuite/tests/ghc-api/T10942.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/T10942.hs b/testsuite/tests/ghc-api/T10942.hs
index a6cee0fd7f..06cdcd62e4 100644
--- a/testsuite/tests/ghc-api/T10942.hs
+++ b/testsuite/tests/ghc-api/T10942.hs
@@ -1,6 +1,7 @@
module Main where
import GHC.Driver.Session
+import GHC.Driver.Config.Parser
import GHC
import Control.Monad.IO.Class (liftIO)
@@ -17,6 +18,7 @@ main = do
let dflags' = dflags `gopt_set` Opt_KeepRawTokenStream
`gopt_set` Opt_Haddock
filename = "T10942_A.hs"
+ parser_opts = initParserOpts dflags'
setSessionDynFlags dflags'
stringBuffer <- liftIO $ hGetStringBuffer filename
- liftIO $ print (map unLoc (getOptions dflags' stringBuffer filename))
+ liftIO $ print (map unLoc (getOptions parser_opts stringBuffer filename))