diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-06-01 10:02:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 10:02:06 +0200 |
commit | 1ceb34bf20ef4f226a4152264505826d3138957e (patch) | |
tree | c436143a5c2851f6cdd7fc79cdd2a8a8afb3c3e0 /haddock-api/src/Haddock/Backends/Hyperlinker | |
parent | c120839debadd7a1427cee84459c01d59c5b85aa (diff) |
Adapt Haddock to Logger and Parser changes (#1399)
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Hyperlinker')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs index 94395218..49e2c66f 100644 --- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs +++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs @@ -10,6 +10,7 @@ import Data.List ( isPrefixOf, isSuffixOf ) import qualified Data.ByteString as BS +import GHC.Platform import GHC.Types.SourceText import GHC.Driver.Session import GHC.Utils.Error ( mkPlainMsgEnvelope, pprLocMsgEnvelope ) @@ -49,9 +50,11 @@ parse dflags fpath bs = case unP (go False []) initState of initState = initParserState pflags buf start buf = stringBufferFromByteString bs start = mkRealSrcLoc (mkFastString fpath) 1 1 + arch_os = platformArchOS (targetPlatform dflags) pflags = mkParserOpts (warningFlags dflags) (extensionFlags dflags) (mkPlainMsgEnvelope dflags) + (supportedLanguagesAndExtensions arch_os) (safeImportsOn dflags) False -- lex Haddocks as comment tokens True -- produce comment tokens |