From c8c3936189741cab791958c770f421b2682a3087 Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 2 Oct 2008 22:57:25 +0000 Subject: For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). --- src/Haddock/Backends/Html.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/Haddock/Backends') diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index 24adc09f..2357d622 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -1618,13 +1618,9 @@ topDeclBox ((_,_,maybe_source_url), (_,_,maybe_wiki_url), iface) (Just name) (Just loc) url in anchor ! [href url'] << toHtml "Source" - -- for source links, we want to point to the original module, - -- because only that will have the source. - origMod = case Map.lookup (nameOccName name) (ifaceEnv iface) of - Just n -> case nameModule_maybe n of - Just m -> m - Nothing -> mod - _ -> error "This shouldn't happen (topDeclBox)" + -- For source links, we want to point to the original module, + -- because only that will have the source. + origMod = nameModule name wikiLink = case maybe_wiki_url of -- cgit v1.2.3