From 212a79093d662ba4f019a87ad9e4a55e4c2b065a Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 27 Oct 2008 19:59:04 +0000 Subject: Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. --- src/Haddock/Interface/Create.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Haddock/Interface') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 25f04d31..b7c82267 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -411,6 +411,7 @@ fullContentsOfThisModule :: Module -> [DeclInfo] -> [ExportItem Name] fullContentsOfThisModule module_ decls = catMaybes (map mkExportItem decls) where mkExportItem (L _ (DocD (DocGroup lev doc)), _, _) = Just $ ExportGroup lev "" doc + mkExportItem (L _ (DocD (DocCommentNamed _ doc)), _, _) = Just $ ExportDoc doc mkExportItem (decl, doc, subs) = Just $ ExportDecl decl doc subdocs [] where subdocs = [ (n, doc) | (n, Just doc) <- subs ] -- cgit v1.2.3