From 527617f3e45367231d7f9c4c4de182870739cf95 Mon Sep 17 00:00:00 2001 From: David Waern Date: Tue, 20 Jan 2009 19:29:51 +0000 Subject: Fix Trac #59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). --- src/Haddock/Interface/Create.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/Haddock/Interface') 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 = -- cgit v1.2.3