aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-12-16 06:05:25 -0500
committerBen Gamari <ben@smart-cactus.org>2015-12-16 09:23:09 -0500
commit66cf3d2714ef1cf851782fbe4378f8c2b1af3335 (patch)
treeec4af86a47c754d7c6d256d5da45e368f5edd76b /haddock-api/src/Haddock/Interface/Rename.hs
parent91217a9642962476a736f6179d0803ddb787c2b9 (diff)
Fix fallout from wildcards refactoring
The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock.
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Rename.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Rename.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs
index 845cb909..091d9bff 100644
--- a/haddock-api/src/Haddock/Interface/Rename.hs
+++ b/haddock-api/src/Haddock/Interface/Rename.hs
@@ -441,6 +441,10 @@ renameSig sig = case sig of
lnames' <- mapM renameL lnames
ltype' <- renameLSigWcType ltype
return (TypeSig lnames' ltype')
+ ClassOpSig is_default lnames sig_ty -> do
+ lnames' <- mapM renameL lnames
+ ltype' <- renameLSigType sig_ty
+ return (ClassOpSig is_default lnames' ltype')
PatSynSig lname sig_ty -> do
lname' <- renameL lname
sig_ty' <- renameLSigType sig_ty