diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-06-28 19:21:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-28 19:21:17 +0200 |
commit | f7059f84687a6aac37405c428a97190662de1dac (patch) | |
tree | 6b3cde6fc146eae894d09ecc162320c4a1e2d6cc /haddock-api/src | |
parent | 0029f289bec7427032785f13cf3bcdebddf7b91f (diff) |
Fix mkParserOpts (#1411)
Diffstat (limited to 'haddock-api/src')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hoogle.hs | 1 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs index dfb167a3..29c64a2d 100644 --- a/haddock-api/src/Haddock/Backends/Hoogle.hs +++ b/haddock-api/src/Haddock/Backends/Hoogle.hs @@ -31,7 +31,6 @@ import GHC import GHC.Driver.Ppr import GHC.Utils.Outputable as Outputable import GHC.Utils.Panic -import GHC.Parser.Annotation (IsUnicodeSyntax(..)) import GHC.Unit.State import Data.Char diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs index 49e2c66f..4e9099d8 100644 --- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs +++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs @@ -13,7 +13,8 @@ import qualified Data.ByteString as BS import GHC.Platform import GHC.Types.SourceText import GHC.Driver.Session -import GHC.Utils.Error ( mkPlainMsgEnvelope, pprLocMsgEnvelope ) +import GHC.Driver.Config.Diagnostic +import GHC.Utils.Error ( pprLocMsgEnvelope ) import GHC.Data.FastString ( mkFastString ) import GHC.Parser.Errors.Ppr () import qualified GHC.Types.Error as E @@ -51,9 +52,8 @@ parse dflags fpath bs = case unP (go False []) initState of buf = stringBufferFromByteString bs start = mkRealSrcLoc (mkFastString fpath) 1 1 arch_os = platformArchOS (targetPlatform dflags) - pflags = mkParserOpts (warningFlags dflags) - (extensionFlags dflags) - (mkPlainMsgEnvelope dflags) + pflags = mkParserOpts (extensionFlags dflags) + (initDiagOpts dflags) (supportedLanguagesAndExtensions arch_os) (safeImportsOn dflags) False -- lex Haddocks as comment tokens |