From ce3ff856c9412d5392fb7a5c37445f60f84cb2d2 Mon Sep 17 00:00:00 2001 From: Richard Eisenberg Date: Fri, 21 Jun 2013 14:08:25 +0100 Subject: Updates to reflect changes in HsDecls to support closed type families. --- src/Haddock/Interface/Create.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/Haddock/Interface/Create.hs') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 40016a0b..d4adbe1c 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -385,16 +385,19 @@ warnAboutFilteredDecls :: DynFlags -> Module -> [LHsDecl Name] -> ErrMsgM () warnAboutFilteredDecls dflags mdl decls = do let modStr = moduleString mdl let typeInstances = - nub (concat [[ unLoc (tfie_tycon eqn) - | L _ (InstD (TyFamInstD (TyFamInstDecl { tfid_eqns = eqns }))) <- decls - , L _ eqn <- eqns ], + nub (concat [[ unLoc (tfie_tycon (unLoc eqn)) + | L _ (InstD (TyFamInstD (TyFamInstDecl { tfid_eqn = eqn }))) <- decls ], [ unLoc (dfid_tycon d) - | L _ (InstD (DataFamInstD { dfid_inst = d })) <- decls ]]) + | L _ (InstD (DataFamInstD { dfid_inst = d })) <- decls ], + [ unLoc tc + | L _ (TyClD (FamDecl (FamilyDecl { fdInfo = ClosedTypeFamily _ + , fdLName = tc }))) <- decls ]]) unless (null typeInstances) $ tell [ "Warning: " ++ modStr ++ ": Instances of type and data " - ++ "families are not yet supported. Instances of the following families " + ++ "families and equations of closed type families are not yet supported." + ++ "Instances of the following families " ++ "will be filtered out:\n " ++ (intercalate ", " $ map (occNameString . nameOccName) typeInstances) ] -- cgit v1.2.3