aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-08 09:42:00 +0100
committerNiklas Haas <git@nand.wakku.to>2014-03-08 09:43:26 +0100
commit17970e6b6aa22962c498ce02ead8dbadad31a733 (patch)
tree0c9232390bce92d8b393214a2d2131a17bc3f07e /src/Haddock/Interface/Rename.hs
parente5bd27b5edf533054513871dc475a54a8b1bee23 (diff)
Render fixity information
Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of.
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 59b11854..4bf39dfb 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -411,6 +411,9 @@ renameSig sig = case sig of
lreq' <- renameLContext lreq
lprov' <- renameLContext lprov
return $ PatSynSig lname' args' ltype' lreq' lprov'
+ FixSig (FixitySig lname fixity) -> do
+ lname' <- renameL lname
+ return $ FixSig (FixitySig lname' fixity)
-- we have filtered out all other kinds of signatures in Interface.Create
_ -> error "expected TypeSig"
@@ -474,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 -> do
+ ExportDecl decl doc subs instances fixities -> do
decl' <- renameLDecl decl
doc' <- renameDocForDecl doc
subs' <- mapM renameSub subs
@@ -482,7 +485,10 @@ renameExportItem item = case item of
inst' <- renameInstHead inst
idoc' <- mapM renameDoc idoc
return (inst', idoc')
- return (ExportDecl decl' doc' subs' instances')
+ fixities' <- forM fixities $ \(name, fixity) -> do
+ name' <- lookupRn name
+ return (name', fixity)
+ return (ExportDecl decl' doc' subs' instances' fixities')
ExportNoDecl x subs -> do
x' <- lookupRn x
subs' <- mapM lookupRn subs