aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authornand <git@nand.wakku.to>2014-02-11 11:52:48 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-11 15:53:50 +0000
commitbc5756d062bbc5cad5d4fa60798435ed020c518e (patch)
tree27735d5534d623d74cd9feef8c2306538f3e9e44 /src/Haddock/Interface/Rename.hs
parente0718f203f2448ba2029e70d14aed075860b7fac (diff)
Improve display of poly-kinded type operators
This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index de23e9b5..59b11854 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -258,14 +258,15 @@ renameLContext (L loc context) = do
renameInstHead :: InstHead Name -> RnM (InstHead DocName)
-renameInstHead (className, types, rest) = do
+renameInstHead (className, k, types, rest) = do
className' <- rename className
+ k' <- mapM renameType k
types' <- mapM renameType types
rest' <- case rest of
ClassInst cs -> ClassInst <$> mapM renameType cs
TypeInst ts -> TypeInst <$> renameType ts
DataInst dd -> DataInst <$> renameTyClD dd
- return (className', types', rest')
+ return (className', k', types', rest')
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName)