aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-09 06:07:09 +0100
committerNiklas Haas <git@nand.wakku.to>2014-03-09 07:53:46 +0100
commit003f11795e4413abae5275e8a855765c571ccab9 (patch)
treeffb3d98d8883a236347e069545adf2f2d3bf3405 /src/Haddock/Interface/Rename.hs
parent9aa5a2a420788e39806c5fe85845002181f3b945 (diff)
Differentiate between TH splices (line-links) and regular names
This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures.
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 4bf39dfb..a5cde195 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -477,7 +477,7 @@ renameExportItem item = case item of
ExportGroup lev id_ doc -> do
doc' <- renameDoc doc
return (ExportGroup lev id_ doc')
- ExportDecl decl doc subs instances fixities -> do
+ ExportDecl decl doc subs instances fixities splice -> do
decl' <- renameLDecl decl
doc' <- renameDocForDecl doc
subs' <- mapM renameSub subs
@@ -488,7 +488,7 @@ renameExportItem item = case item of
fixities' <- forM fixities $ \(name, fixity) -> do
name' <- lookupRn name
return (name', fixity)
- return (ExportDecl decl' doc' subs' instances' fixities')
+ return (ExportDecl decl' doc' subs' instances' fixities' splice)
ExportNoDecl x subs -> do
x' <- lookupRn x
subs' <- mapM lookupRn subs