From 6655f93324b7f1d30a6baaedfecae455d5e08e39 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 16 Mar 2020 15:00:25 +0100 Subject: 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'`. --- testsuite/tests/ghc-api/T9015.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testsuite/tests') 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) -- cgit v1.2.1