diff options
author | alexbiehl-gc <72160047+alexbiehl-gc@users.noreply.github.com> | 2021-02-07 18:39:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 18:39:59 +0100 |
commit | 786d3e69799398c3aac26fbd5017a127bc69cacc (patch) | |
tree | 883ee3f8c0e195299925b790cba6f88a537200f6 /haddock-api/src/Haddock/Parser.hs | |
parent | e90e79815960823a749287968fb1c6d09559a67f (diff) | |
parent | 0f7ff041fb824653a7930e1292b81f34df1e967d (diff) |
Merge branch 'ghc-head' into ghc-9.0
Diffstat (limited to 'haddock-api/src/Haddock/Parser.hs')
-rw-r--r-- | haddock-api/src/Haddock/Parser.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Parser.hs b/haddock-api/src/Haddock/Parser.hs index e335ee19..ab2fa549 100644 --- a/haddock-api/src/Haddock/Parser.hs +++ b/haddock-api/src/Haddock/Parser.hs @@ -19,8 +19,9 @@ import Documentation.Haddock.Types import Haddock.Types import GHC.Driver.Session ( DynFlags ) +import GHC.Driver.Config import GHC.Data.FastString ( fsLit ) -import GHC.Parser.Lexer ( mkPState, unP, ParseResult(POk, PFailed) ) +import GHC.Parser.Lexer ( initParserState, unP, ParseResult(POk, PFailed) ) import GHC.Parser ( parseIdentifier ) import GHC.Types.Name.Occurrence ( occNameString ) import GHC.Types.Name.Reader ( RdrName(..) ) @@ -48,7 +49,7 @@ parseIdent dflags ns str0 = PFailed{} -> Nothing where realSrcLc = mkRealSrcLoc (fsLit "<unknown file>") 0 0 - pstate str = mkPState dflags (stringToStringBuffer str) realSrcLc + pstate str = initParserState (initParserOpts dflags) (stringToStringBuffer str) realSrcLc (wrap,str1) = case str0 of '(' : s@(c : _) | c /= ',', c /= ')' -- rule out tuple names -> (Parenthesized, init s) |