summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-03-16 15:00:25 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-21 06:39:32 -0400
commit6655f93324b7f1d30a6baaedfecae455d5e08e39 (patch)
treee0a260f8b69d3cfcdf6d890849b88933fe6f3f6b /testsuite/tests/ghc-api
parentbca02fca0119354a6201fd5d019a553015ba2dd8 (diff)
downloadhaskell-6655f93324b7f1d30a6baaedfecae455d5e08e39.tar.gz
Use ParserFlags in GHC.Runtime.Eval (#17957)
Instead of passing `DynFlags` to functions such as `isStmt` and `hasImport` in `GHC.Runtime.Eval` we pass `ParserFlags`. It's a much simpler structure that can be created purely with `mkParserFlags'`.
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r--testsuite/tests/ghc-api/T9015.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/tests/ghc-api/T9015.hs b/testsuite/tests/ghc-api/T9015.hs
index 228449041d..3388ee0566 100644
--- a/testsuite/tests/ghc-api/T9015.hs
+++ b/testsuite/tests/ghc-api/T9015.hs
@@ -2,8 +2,9 @@ module Main where
import GHC
import GHC.Driver.Session
-import System.Environment
import GHC.Driver.Monad
+import GHC.Parser.Lexer (mkParserFlags)
+import System.Environment
testStrings = [
"import Data.Maybe"
@@ -52,7 +53,8 @@ main = do
where
testWithParser parser = do
dflags <- getSessionDynFlags
- liftIO . putStrLn . unlines $ map (testExpr (parser dflags)) testStrings
+ let pflags = mkParserFlags dflags
+ liftIO . putStrLn . unlines $ map (testExpr (parser pflags)) testStrings
testExpr parser expr = do
expr ++ ": " ++ show (parser expr)