diff options
author | David Waern <david.waern@gmail.com> | 2011-05-22 01:45:44 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-05-22 01:45:44 +0000 |
commit | bc585fadfe146c3e0521266c83c12f8c54151a34 (patch) | |
tree | a2c273db99bbde3ccc54cad03f3073e29888b48e /src/Haddock/Interface/Create.hs | |
parent | aee6d6b5b733aa9bcfa278f8ed8e7c93472c4671 (diff) |
We don't need to send DocOptions nor a flag to mkExportItems
Diffstat (limited to 'src/Haddock/Interface/Create.hs')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 54661f3c..4ff855b3 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -69,13 +69,15 @@ createInterface tm flags modMap instIfaceMap = do decls = filterOutInstances decls0 declMap = mkDeclMap decls - exports = fmap (reverse . map unLoc) optExports - ignoreExps = Flag_IgnoreAllExports `elem` flags + exports0 = fmap (reverse . map unLoc) optExports + exports + | OptIgnoreExports `elem` opts = Nothing + | otherwise = exports liftErrMsg $ warnAboutFilteredDecls mdl decls0 exportItems <- mkExportItems modMap mdl gre exportedNames decls declMap - opts exports ignoreExps instances instIfaceMap dflags + exports instances instIfaceMap dflags let visibleNames = mkVisibleNames exportItems opts @@ -442,19 +444,17 @@ mkExportItems -> [Name] -- exported names (orig) -> [DeclInfo] -> Map Name DeclInfo -- maps local names to declarations - -> [DocOption] -> Maybe [IE Name] - -> Bool -- --ignore-all-exports flag -> [Instance] -> InstIfaceMap -> DynFlags -> ErrMsgGhc [ExportItem Name] mkExportItems modMap this_mod gre exported_names decls declMap - opts maybe_exps ignore_all_exports _ instIfaceMap dflags - | isNothing maybe_exps || ignore_all_exports || OptIgnoreExports `elem` opts - = everything_local_exported - | otherwise = liftM concat $ mapM lookupExport (fromJust maybe_exps) + optExports _ instIfaceMap dflags = + case optExports of + Just exports -> everything_local_exported + Nothing -> liftM concat $ mapM lookupExport exports where |