From a969de7fdb7dcaacb58b81554d67a79818541241 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 5 Nov 2003 12:30:28 +0000 Subject: [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. --- src/HaddockHtml.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 001aa7a2..7251cb90 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -280,22 +280,22 @@ ppHtmlIndex odir doctitle ifaces = do index :: (HsName -> Bool) -> [(HsName, [(Module,Bool)])] index f = sortBy cmp (fmToList (full_index f)) where cmp (n1,_) (n2,_) = n1 `compare` n2 - + iface_indices f = map (getIfaceIndex f) ifaces full_index f = foldr (plusFM_C (++)) emptyFM (iface_indices f) getIfaceIndex f (mdl,iface) = listToFM - [ (nm, [(mdl, mdl == mdl')]) + [ (nm, [(mdl, not (nm `elemFM` iface_reexported iface))]) | (nm, Qual mdl' _) <- fmToList (iface_env iface), f nm ] indexElt :: (HsName, [(Module,Bool)]) -> HtmlTable indexElt (nm, entries) = td << ppHsName nm - <-> td << (hsep [ if defining then - bold << linkId (Module mdl) (Just nm) << toHtml mdl - else + <-> td << (hsep [ if visible then linkId (Module mdl) (Just nm) << toHtml mdl - | (Module mdl, defining) <- entries ]) + else + toHtml mdl + | (Module mdl, visible) <- entries ]) initialChars = [ 'A'..'Z' ] ++ ":!#$%&*+./<=>?@\\^|-~" -- cgit v1.2.3