aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-01-20 19:29:51 +0000
committerDavid Waern <david.waern@gmail.com>2009-01-20 19:29:51 +0000
commit527617f3e45367231d7f9c4c4de182870739cf95 (patch)
treec89cdcea3dcccc490024a31fa071750dfc7cb396 /src/Haddock
parentba0072ff1f1319421aa38b216903ea89d589bf20 (diff)
Fix Trac #59: TH-generated declarations disappearing
This patch was contributed by Joachim Breitner (nomeata).
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Interface/Create.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 3dee5d6a..e2180f6d 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -289,7 +289,6 @@ filterClasses decls = [ if isClassD d then (L loc (filterClass d), doc) else x
collectDocs :: [Decl] -> [(Decl, (Maybe Doc))]
collectDocs decls = collect Nothing DocEmpty decls
-
collect :: Maybe Decl -> Doc -> [Decl] -> [(Decl, (Maybe Doc))]
collect d doc_so_far [] =
case d of
@@ -307,9 +306,7 @@ collect d doc_so_far (e:es) =
_ -> case d of
Nothing -> collect (Just e) doc_so_far es
- Just d0
- | sameDecl d0 e -> collect d doc_so_far es
- | otherwise -> finishedDoc d0 doc_so_far (collect (Just e) DocEmpty es)
+ Just d0 -> finishedDoc d0 doc_so_far (collect (Just e) DocEmpty es)
finishedDoc :: Decl -> Doc -> [(Decl, (Maybe Doc))] -> [(Decl, (Maybe Doc))]
@@ -321,9 +318,6 @@ finishedDoc d doc rest | notDocDecl d = (d, Just doc) : rest
finishedDoc _ _ rest = rest
-sameDecl d1 d2 = getLoc d1 == getLoc d2
-
-
{-
attachATs :: [IE Name] -> ([IE Name], [Name])
attachATs exports =