aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/AttachInstances.hs
diff options
context:
space:
mode:
authorIsaac Dupree <id@isaac.cedarswampstudios.org>2009-08-23 06:26:36 +0000
committerIsaac Dupree <id@isaac.cedarswampstudios.org>2009-08-23 06:26:36 +0000
commit3a51468aabab2a3f4b9e06e7e0025f2421e07469 (patch)
tree0b3cd5e8096900b5855e8bf77b522bf4d3bfb027 /src/Haddock/Interface/AttachInstances.hs
parent708bfb537b377129ea81025efbef3f6270fb827f (diff)
re-implement function-argument docs
..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently.
Diffstat (limited to 'src/Haddock/Interface/AttachInstances.hs')
-rw-r--r--src/Haddock/Interface/AttachInstances.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs
index f9a951f3..122ea5d0 100644
--- a/src/Haddock/Interface/AttachInstances.hs
+++ b/src/Haddock/Interface/AttachInstances.hs
@@ -44,13 +44,14 @@ attachInstances = mapM attach
attach iface = do
newItems <- mapM attachExport $ ifaceExportItems iface
return $ iface { ifaceExportItems = newItems }
- attachExport (ExportDecl decl@(L _ (TyClD d)) doc subs _) = do
+ attachExport export@ExportDecl{expItemDecl = L _ (TyClD d)} = do
mb_info <- getAllInfo (unLoc (tcdLName d))
- return $ ExportDecl decl doc subs $ case mb_info of
+ return $ export { expItemInstances = case mb_info of
Just (_, _, instances) ->
map toHsInstHead . sortImage instHead . map instanceHead $ instances
Nothing ->
[]
+ }
attachExport export = return export