aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-03-31 09:18:39 -0400
committerGitHub <noreply@github.com>2021-03-31 09:18:39 -0400
commite0aa493cc4f881166258ee6fdcd6bd208e18ab0e (patch)
treef981a231e4338333c6ed64efbda103a809382f2a /haddock-api/src/Haddock/Backends
parent7afbc6b0af2c350a96c56237f3c2d3f3de204195 (diff)
parent4c471b8ffc5dc59ce72128c1d74818a08c5743cc (diff)
Merge pull request #1370 from adinapoli/wip/adinapoli-diag-reason-severity
Rename pprError to mkParserErr
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
index d9a2e0cd..e6748937 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
@@ -14,7 +14,7 @@ import GHC.Types.SourceText
import GHC.Driver.Session
import GHC.Utils.Error ( pprLocMsgEnvelope )
import GHC.Data.FastString ( mkFastString )
-import GHC.Parser.Errors.Ppr ( pprError )
+import GHC.Parser.Errors.Ppr ( mkParserErr )
import GHC.Parser.Lexer as Lexer
( P(..), ParseResult(..), PState(..), Token(..)
, initParserState, lexer, mkParserOpts, getErrorMessages)
@@ -40,7 +40,7 @@ parse
parse dflags fpath bs = case unP (go False []) initState of
POk _ toks -> reverse toks
PFailed pst ->
- let err:_ = bagToList (fmap pprError (getErrorMessages pst)) in
+ let err:_ = bagToList (fmap mkParserErr (getErrorMessages pst)) in
panic $ showSDoc dflags $
text "Hyperlinker parse error:" $$ pprLocMsgEnvelope err
where