aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--haddock.cabal2
-rw-r--r--src/HaddockHtml.hs21
2 files changed, 11 insertions, 12 deletions
diff --git a/haddock.cabal b/haddock.cabal
index daca9693..344bb0e4 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -56,7 +56,7 @@ extra-source-files:
executable: haddock
hs-source-dirs: src
main-is: Main.hs
-extensions: CPP, PatternGuards
+extensions: CPP
other-modules:
Binary
BlockTable
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs
index c8561491..5c6bd892 100644
--- a/src/HaddockHtml.hs
+++ b/src/HaddockHtml.hs
@@ -554,11 +554,10 @@ ifaceToHtml maybe_source_url maybe_wiki_url iface
contents = td << vanillaTable << ppModuleContents exports
description
- | Just doc <- iface_doc iface
- = (tda [theclass "section1"] << toHtml "Description") </>
- docBox (docToHtml doc)
- | otherwise
- = Html.emptyTable
+ = case iface_doc iface of
+ Nothing -> Html.emptyTable
+ Just doc -> (tda [theclass "section1"] << toHtml "Description") </>
+ docBox (docToHtml doc)
-- omit the synopsis if there are no documentation annotations at all
synopsis
@@ -910,9 +909,9 @@ ppHsClassDecl summary links instances orig_c
hdr = ppClassHdr summary ctxt nm tvs fds
- classdoc
- | Just d <- doc = ndocBox (docToHtml d)
- | otherwise = Html.emptyTable
+ classdoc = case doc of
+ Nothing -> Html.emptyTable
+ Just d -> ndocBox (docToHtml d)
methods_bit
| null decls = Html.emptyTable
@@ -1057,9 +1056,9 @@ ppHsQName n@(Qual mdl str)
| otherwise = linkId mdl (Just str) << ppHsName str
isSpecial :: HsName -> Bool
-isSpecial (HsTyClsName id0) | HsSpecial _ <- id0 = True
-isSpecial (HsVarName id0) | HsSpecial _ <- id0 = True
-isSpecial _ = False
+isSpecial (HsTyClsName (HsSpecial _)) = True
+isSpecial (HsVarName (HsSpecial _)) = True
+isSpecial _ = False
ppHsName :: HsName -> Html
ppHsName nm = toHtml (hsNameStr nm)