diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-09-10 18:20:45 +0200 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2020-09-29 17:24:03 +0200 |
commit | 8e3f00dd24936b6674d0a2322f8410125968583e (patch) | |
tree | d9630cc481aff867c16300b049b28e8cdd1a7aa2 /compiler/GHC/Cmm | |
parent | 4365d77a0b306ada61654c3648b844cfa0f4fdcf (diff) | |
download | haskell-8e3f00dd24936b6674d0a2322f8410125968583e.tar.gz |
Make the parser module less dependent on DynFlags
Bump haddock submodule
Diffstat (limited to 'compiler/GHC/Cmm')
-rw-r--r-- | compiler/GHC/Cmm/Parser.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/Parser.y b/compiler/GHC/Cmm/Parser.y index 3771a0e82c..e1e89e9977 100644 --- a/compiler/GHC/Cmm/Parser.y +++ b/compiler/GHC/Cmm/Parser.y @@ -249,6 +249,7 @@ import GHC.Types.Unique.FM import GHC.Types.SrcLoc import GHC.Driver.Session import GHC.Driver.Ppr +import GHC.Driver.Config import GHC.Utils.Error import GHC.Data.StringBuffer import GHC.Data.FastString @@ -1432,7 +1433,8 @@ parseCmmFile dflags filename = withTiming dflags (text "ParseCmm"<+>brackets (te buf <- hGetStringBuffer filename let init_loc = mkRealSrcLoc (mkFastString filename) 1 1 - init_state = (mkPState dflags buf init_loc) { lex_state = [0] } + opts = initParserOpts dflags + init_state = (initParserState opts buf init_loc) { lex_state = [0] } -- reset the lex_state: the Lexer monad leaves some stuff -- in there we don't want. case unPD cmmParse dflags init_state of |