diff options
author | David Waern <david.waern@gmail.com> | 2011-06-11 00:33:33 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-06-11 00:33:33 +0000 |
commit | ab24835eadb99059934d7a14f86564eea6449257 (patch) | |
tree | 8ba6e31d9162a8ec69b437ceace3bb95be01f91b /src/Haddock/Backends/Xhtml/Layout.hs | |
parent | ae5ed291f3c1550b0eda7bb0585ead327b5d967e (diff) |
* Merge in git patch from Michal Terepeta
From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001
From: Michal Terepeta <michal.terepeta@gmail.com>
Date: Sat, 14 May 2011 19:18:22 +0200
Subject: [PATCH] Follow the change of TypeSig in GHC.
This follows the change in GHC to make TypeSig take a list
of names (instead of just one); GHC ticket #1595. This
should also improve the Haddock output in case the user
writes a type signature that refers to many names:
-- | Some comment..
foo, bar :: ...
will now generate the expected output with one signature for
both names.
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Layout.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml/Layout.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index e5d8c24e..91eac9c6 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -176,8 +176,8 @@ declElem = paragraph ! [theclass "src"] -- a box for top level documented names -- it adds a source and wiki link at the right hand side of the box -topDeclElem :: LinksInfo -> SrcSpan -> DocName -> Html -> Html -topDeclElem ((_,_,sourceMap), (_,_,maybe_wiki_url)) loc name html = +topDeclElem :: LinksInfo -> SrcSpan -> [DocName] -> Html -> Html +topDeclElem ((_,_,sourceMap), (_,_,maybe_wiki_url)) loc names html = declElem << (html +++ srcLink +++ wikiLink) where srcLink = case Map.lookup origPkg sourceMap of @@ -201,7 +201,8 @@ topDeclElem ((_,_,sourceMap), (_,_,maybe_wiki_url)) loc name html = origPkg = modulePackageId origMod -- Name must be documented, otherwise we wouldn't get here - Documented n mdl = name + Documented n mdl = head names + -- FIXME: is it ok to simply take the first name? fname = unpackFS (srcSpanFile loc) |