aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Html.hs
diff options
context:
space:
mode:
authordavid.waern <david.waern@gmail.com>2010-03-18 22:22:27 +0000
committerdavid.waern <david.waern@gmail.com>2010-03-18 22:22:27 +0000
commit629ff801073bb90a968dbc882b0c443d13e4d92e (patch)
tree1c3da3f3263700813ee55c046d00ea1956d4fdd5 /src/Haddock/Backends/Html.hs
parentaccca44fea8b531d27df063f403abbe4303d6ddc (diff)
Fix build with GHC 6.12.1
Diffstat (limited to 'src/Haddock/Backends/Html.hs')
-rw-r--r--src/Haddock/Backends/Html.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index b1290fd5..47930ed4 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -1368,7 +1368,11 @@ ppShortConstr summary con unicode = case con_res con of
mkFunTy a b = noLoc (HsFunTy a b)
-- ppConstrHdr is for (non-GADT) existentials constructors' syntax
+#if __GLASGOW_HASKELL__ == 612
+ppConstrHdr :: HsExplicitForAll -> [Name] -> HsContext DocName -> Bool -> Html
+#else
ppConstrHdr :: HsExplicitFlag -> [Name] -> HsContext DocName -> Bool -> Html
+#endif
ppConstrHdr forall tvs ctxt unicode
= (if null tvs then noHtml else ppForall)
+++
@@ -1580,7 +1584,11 @@ ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode
-- Drop top-level for-all type variables in user style
-- since they are implicit in Haskell
+#if __GLASGOW_HASKELL__ == 612
+ppForAll :: HsExplicitForAll -> [Located (HsTyVarBndr DocName)]
+#else
ppForAll :: HsExplicitFlag -> [Located (HsTyVarBndr DocName)]
+#endif
-> Located (HsContext DocName) -> Bool -> Html
ppForAll expl tvs cxt unicode
| show_forall = forall_part <+> ppLContext cxt unicode
@@ -1610,8 +1618,12 @@ ppr_mono_ty _ (HsPArrTy ty) u = pabrackets (ppr_mono_lty pREC_TOP
ppr_mono_ty _ (HsPredTy p) u = parens (ppPred u p)
ppr_mono_ty _ (HsNumTy n) _ = toHtml (show n) -- generics only
ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy"
+#if __GLASGOW_HASKELL__ == 612
+ppr_mono_ty _ (HsSpliceTyOut {}) _ = error "ppr_mono_ty HsQuasiQuoteTy"
+#else
ppr_mono_ty _ (HsQuasiQuoteTy {}) _ = error "ppr_mono_ty HsQuasiQuoteTy"
-ppr_mono_ty _ (HsRecTy _) _ = error "ppr_mono_ty HsRecTy"
+#endif
+ppr_mono_ty _ (HsRecTy {}) _ = error "ppr_mono_ty HsRecTy"
ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) unicode
= maybeParen ctxt_prec pREC_CON $