diff options
Diffstat (limited to 'compiler/GHC/Driver/Config/Parser.hs')
-rw-r--r-- | compiler/GHC/Driver/Config/Parser.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Config/Parser.hs b/compiler/GHC/Driver/Config/Parser.hs new file mode 100644 index 0000000000..bc4c589bf8 --- /dev/null +++ b/compiler/GHC/Driver/Config/Parser.hs @@ -0,0 +1,24 @@ +module GHC.Driver.Config.Parser + ( initParserOpts + ) +where + +import GHC.Prelude + +import GHC.Driver.Session +import GHC.Utils.Error + +import GHC.Parser.Lexer + +-- | Extracts the flags needed for parsing +initParserOpts :: DynFlags -> ParserOpts +initParserOpts = + mkParserOpts + <$> warningFlags + <*> extensionFlags + <*> mkPlainMsgEnvelope + <*> safeImportsOn + <*> gopt Opt_Haddock + <*> gopt Opt_KeepRawTokenStream + <*> const True -- use LINE/COLUMN to update the internal location + |