aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Html.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-10-02 22:57:25 +0000
committerDavid Waern <david.waern@gmail.com>2008-10-02 22:57:25 +0000
commitc8c3936189741cab791958c770f421b2682a3087 (patch)
treecc5cbb88e99638e3413b491e1f16778a5449b741 /src/Haddock/Backends/Html.hs
parentb1c69e26222ed21222faa3bfe70d24b7ed514f42 (diff)
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).
Diffstat (limited to 'src/Haddock/Backends/Html.hs')
-rw-r--r--src/Haddock/Backends/Html.hs10
1 files changed, 3 insertions, 7 deletions
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