From 105869f209f49721794e3ff5e35822178db72895 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 20 Dec 2015 09:50:42 +0200 Subject: Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc --- haddock-api/src/Haddock/Backends/LaTeX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs') diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index ab6bb41c..ec7f715c 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -740,7 +740,7 @@ ppSideBySideConstr subdocs unicode leader (L loc con) = ppSideBySideField :: [(DocName, DocForDecl DocName)] -> Bool -> ConDeclField DocName -> LaTeX ppSideBySideField subdocs unicode (ConDeclField names ltype _) = - decltt (cat (punctuate comma (map (ppBinder . rdrNameOcc . rdrNameFieldOcc . unLoc) names)) + decltt (cat (punctuate comma (map (ppBinder . rdrNameOcc . unLoc . rdrNameFieldOcc . unLoc) names)) <+> dcolon unicode <+> ppLType unicode ltype) <-> rDoc mbDoc where -- don't use cd_fld_doc for same reason we don't use con_doc above -- cgit v1.2.3 From fef5e32ca541eb70b22d8e8da611e4a2b797e00c Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Tue, 22 Dec 2015 16:26:56 +0000 Subject: Follow removal of NamedWildCard from HsType --- haddock-api/src/Haddock/Backends/LaTeX.hs | 2 -- haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 3 --- haddock-api/src/Haddock/Interface/Rename.hs | 1 - 3 files changed, 6 deletions(-) (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs') diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index ec7f715c..e3246d7b 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -981,8 +981,6 @@ ppr_mono_ty ctxt_prec (HsDocTy ty _) unicode ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ = char '_' -ppr_mono_ty _ (HsWildCardTy (NamedWildCard (L _ name))) _ = ppDocName name - ppr_mono_ty _ (HsTyLit t) u = ppr_tylit t u ppr_mono_ty _ (HsAppsTy {}) _ = panic "ppr_mono_ty:HsAppsTy" diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 033f74ac..e20c9813 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -997,9 +997,6 @@ ppr_mono_ty ctxt_prec (HsDocTy ty _) unicode qual = ppr_mono_lty ctxt_prec ty unicode qual ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ _ = char '_' - -ppr_mono_ty _ (HsWildCardTy (NamedWildCard (L _ name))) _ q = ppDocName q Prefix True name - ppr_mono_ty _ (HsTyLit n) _ _ = ppr_tylit n ppr_tylit :: HsTyLit -> Html diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index 2478ce23..6ff4b571 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -284,7 +284,6 @@ renameLContext (L loc context) = do renameWildCardInfo :: HsWildCardInfo Name -> RnM (HsWildCardInfo DocName) renameWildCardInfo (AnonWildCard (L l name)) = AnonWildCard . L l <$> rename name -renameWildCardInfo (NamedWildCard (L l name)) = NamedWildCard . L l <$> rename name renameInstHead :: InstHead Name -> RnM (InstHead DocName) renameInstHead InstHead {..} = do -- cgit v1.2.3