From ad26b0b817460fdc444536f7f5d77d8dd328d7af Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 3 Aug 2008 15:25:27 +0000 Subject: Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. --- src/Haddock/Interface/Create.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/Haddock/Interface') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 70713b5d..3fc21342 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -184,7 +184,10 @@ classDataSubs decl | isDataDecl decl = recordFields | otherwise = [] where - classMeths = [ (declName d, doc) | (L _ d, doc) <- classDecls decl ] + -- for now, we don't include AT names in the map, since we can't yet + -- handle separately exported ATs. (We should warn about this, really). + classMeths = [ (declName d, doc) | (L _ d, doc) <- classDecls decl + , not (isTyClD d) ] recordFields = [ (unLoc lname, fmap unLoc doc) | ConDeclField lname _ doc <- fields ] cons = [ con | L _ con <- tcdCons decl ] @@ -349,6 +352,14 @@ mkSubMap group = Map.fromList [ (name, subs) | L _ tycld <- hs_tyclds group, let name:subs = map unLoc (tyClDeclNames tycld) ] +{- +attachATs :: [IE Name] -> ([IE Name], [Name]) +attachATs exports = + where + ats = <- export ] +-} + + -- | Build the list of items that will become the documentation, from the -- export list. At this point, the list of ExportItems is in terms of -- original names. @@ -450,6 +461,7 @@ extractDecl name mdl decl TyClD d | isClassDecl d -> let matches = [ sig | sig <- tcdSigs d, sigName sig == Just name, isVanillaLSig sig ] -- TODO: document fixity +-- let assocMathes = [ tyDecl | at <- tcdATs d, ] in case matches of [s0] -> let (n, tyvar_names) = name_and_tyvars d L pos sig = extractClassDecl n mdl tyvar_names s0 -- cgit v1.2.3