From 3073526a26d013e8751068fbd526974dcfb8259f Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Wed, 29 Jul 2015 15:37:48 +0200 Subject: Make instance details record use new type for family declarations. --- haddock-api/src/Haddock/Interface/Rename.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock/Interface') diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index 82d14a2c..146a7c0b 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -268,7 +268,7 @@ renameInstHead InstHead {..} = do <$> mapM renameType clsiCtx <*> renameLTyVarBndrs clsiTyVars <*> mapM renameSig clsiSigs - <*> mapM renameFamilyDecl clsiAssocTys + <*> mapM renamePseudoFamilyDecl clsiAssocTys TypeInst ts -> TypeInst <$> traverse renameType ts DataInst dd -> DataInst <$> renameTyClD dd return InstHead @@ -352,6 +352,16 @@ renameFamilyDecl (FamilyDecl { fdInfo = info, fdLName = lname return (FamilyDecl { fdInfo = info', fdLName = lname' , fdTyVars = ltyvars', fdKindSig = tckind' }) + +renamePseudoFamilyDecl :: PseudoFamilyDecl Name + -> RnM (PseudoFamilyDecl DocName) +renamePseudoFamilyDecl (PseudoFamilyDecl { .. }) = PseudoFamilyDecl + <$> renameFamilyInfo pfdInfo + <*> renameL pfdLName + <*> mapM renameLType pfdTyVars + <*> renameMaybeLKind pfdKindSig + + renameFamilyInfo :: FamilyInfo Name -> RnM (FamilyInfo DocName) renameFamilyInfo DataFamily = return DataFamily renameFamilyInfo OpenTypeFamily = return OpenTypeFamily -- cgit v1.2.3