From 23ff0a0702ecc318a33a083f8617a542c5cfe2f4 Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 25 Oct 2007 14:02:14 +0000 Subject: Don't set boot modules as targets --- src/Haddock/GHC/Typecheck.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Haddock') diff --git a/src/Haddock/GHC/Typecheck.hs b/src/Haddock/GHC/Typecheck.hs index 59422fe0..52abc4ab 100644 --- a/src/Haddock/GHC/Typecheck.hs +++ b/src/Haddock/GHC/Typecheck.hs @@ -21,6 +21,8 @@ import Digraph import BasicTypes import SrcLoc +import Data.List + typecheckFiles :: Session -> [FilePath] -> IO [GhcModule] typecheckFiles session files = do @@ -60,13 +62,14 @@ sortAndCheckModules session files = do -- load all argument files targets <- mapM (\f -> guessTarget f Nothing) files - setTargets session targets + setTargets session targets -- compute the dependencies and load them as well - allMods <- getSortedModuleGraph session - targets' <- mapM (\(_, f) -> guessTarget f Nothing) allMods - setTargets session targets' + allMods0 <- getSortedModuleGraph session + let allMods = nub $ filter (not . ("-boot" `isSuffixOf`) . snd) allMods0 + setTargets session [Target (TargetModule $ moduleName m) Nothing + | (m, _) <- allMods ] flag <- load session LoadAllTargets when (failed flag) $ -- cgit v1.2.3