From 69422327f934c04795bd9d3438847babe1cc785d Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 10 Nov 2003 14:41:06 +0000 Subject: [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. --- src/HaddockRename.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/HaddockRename.hs') diff --git a/src/HaddockRename.hs b/src/HaddockRename.hs index ad90c1a2..86e74490 100644 --- a/src/HaddockRename.hs +++ b/src/HaddockRename.hs @@ -265,6 +265,10 @@ renameExportItems items = mapM rn items = do decl <- renameDecl decl0 mapM renameInstHead insts return (ExportDecl x decl insts) + rn (ExportNoDecl x y subs) + = do y' <- lookupRn id y + subs' <- mapM (lookupRn id) subs + return (ExportNoDecl x y' subs') rn (ExportDoc doc0) = do doc <- renameDoc doc0 return (ExportDoc doc) -- cgit v1.2.3