aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-06-21 14:08:25 +0100
committerRichard Eisenberg <eir@cis.upenn.edu>2013-06-21 14:08:25 +0100
commitce3ff856c9412d5392fb7a5c37445f60f84cb2d2 (patch)
tree9a3ba795f0def258affe1a4c456edc3bfee6d0fe /src/Haddock/Interface/Create.hs
parent336e635f0462daadaa280e8c3dbb4f23422e341f (diff)
Updates to reflect changes in HsDecls to support closed type families.
Diffstat (limited to 'src/Haddock/Interface/Create.hs')
-rw-r--r--src/Haddock/Interface/Create.hs13
1 files changed, 8 insertions, 5 deletions
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) ]