diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-08-10 14:41:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-10 14:41:41 -0400 |
commit | 7de9589e0191bbd79521597d35c2a0c68d2c9add (patch) | |
tree | 426a7cfada2f4494115dbac522b5ae834128d516 /haddock-api/src/Haddock/Interface | |
parent | 7e0612e2745ba139af40a4db18406197ff60b1bd (diff) | |
parent | cdae236f0ab7015f3a466b2c9b2449ba038b45f6 (diff) |
Merge pull request #1223 from hsyl20/wip/hsyl20/dynflags/exception
Fix after Outputable refactoring
Diffstat (limited to 'haddock-api/src/Haddock/Interface')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 8 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/LexParseRn.hs | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 1f223282..ffaec7f1 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -44,6 +44,7 @@ import qualified GHC.Types.SrcLoc as SrcLoc import GHC.Core.ConLike (ConLike(..)) import GHC import GHC.Driver.Types +import GHC.Driver.Ppr import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Env @@ -53,6 +54,7 @@ import GHC.Tc.Types import GHC.Data.FastString ( unpackFS, bytesFS ) import GHC.Types.Basic ( StringLiteral(..), SourceText(..), PromotionFlag(..) ) import qualified GHC.Utils.Outputable as O +import GHC.Utils.Panic import GHC.HsToCore.Docs hiding (mkMaps) @@ -722,7 +724,7 @@ hiDecl dflags t = do warnLine x = O.text "haddock-bug:" O.<+> O.text x O.<> O.comma O.<+> O.quotes (O.ppr t) O.<+> O.text "-- Please report this on Haddock issue tracker!" - bugWarn = O.showSDoc dflags . warnLine + bugWarn = showSDoc dflags . warnLine -- | This function is called for top-level bindings without type signatures. -- It gets the type signature from GHC and that means it's not going to @@ -884,7 +886,7 @@ extractDecl declMap name decl ([], []) | Just (famInstDecl:_) <- M.lookup name declMap -> extractDecl declMap name famInstDecl - _ -> O.pprPanic "extractDecl" (O.text "Ambiguous decl for" O.<+> O.ppr name O.<+> O.text "in class:" + _ -> pprPanic "extractDecl" (O.text "Ambiguous decl for" O.<+> O.ppr name O.<+> O.text "in class:" O.$$ O.nest 4 (O.ppr d) O.$$ O.text "Matches:" O.$$ O.nest 4 (O.ppr matchesMethod O.<+> O.ppr matchesAssociatedType)) @@ -927,7 +929,7 @@ extractDecl declMap name decl in case matches of [d0] -> extractDecl declMap name (noLoc . InstD noExtField $ DataFamInstD noExtField d0) _ -> error "internal: extractDecl (ClsInstD)" - _ -> O.pprPanic "extractDecl" $ + _ -> pprPanic "extractDecl" $ O.text "Unhandled decl for" O.<+> O.ppr name O.<> O.text ":" O.$$ O.nest 4 (O.ppr decl) diff --git a/haddock-api/src/Haddock/Interface/LexParseRn.hs b/haddock-api/src/Haddock/Interface/LexParseRn.hs index 2b03ecfa..2c06438f 100644 --- a/haddock-api/src/Haddock/Interface/LexParseRn.hs +++ b/haddock-api/src/Haddock/Interface/LexParseRn.hs @@ -32,7 +32,7 @@ import Haddock.Interface.ParseModuleHeader import Haddock.Parser import Haddock.Types import GHC.Types.Name -import GHC.Utils.Outputable ( showPpr, showSDoc ) +import GHC.Driver.Ppr ( showPpr, showSDoc ) import GHC.Types.Name.Reader import GHC.Data.EnumSet as EnumSet import GHC.Rename.Env (dataTcOccs) |