diff options
author | nand <git@nand.wakku.to> | 2014-02-04 22:13:27 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-02-11 15:48:30 +0000 |
commit | e0718f203f2448ba2029e70d14aed075860b7fac (patch) | |
tree | be0d1a8d69efe1c7114b0740a660dff28939ad69 /src/Haddock/Interface/Rename.hs | |
parent | 860d6504530a163e7483960ca8837eb596e05634 (diff) |
Add support for type/data families
This adds support for type/data families with their respective
instances, as well as closed type families and associated type/data
families.
Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r-- | src/Haddock/Interface/Rename.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs index b4a7e19a..de23e9b5 100644 --- a/src/Haddock/Interface/Rename.hs +++ b/src/Haddock/Interface/Rename.hs @@ -258,11 +258,14 @@ renameLContext (L loc context) = do renameInstHead :: InstHead Name -> RnM (InstHead DocName) -renameInstHead (preds, className, types) = do - preds' <- mapM renameType preds +renameInstHead (className, types, rest) = do className' <- rename className types' <- mapM renameType types - return (preds', className', 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') renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName) |