diff options
author | David Waern <davve@dtek.chalmers.se> | 2007-10-25 14:02:14 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2007-10-25 14:02:14 +0000 |
commit | 23ff0a0702ecc318a33a083f8617a542c5cfe2f4 (patch) | |
tree | 1c9bc9cbba37a7fcba82c436a5a8010a4d0341c9 /src/Haddock | |
parent | 5ab2abc9ce2d7df19a49a5de5c79d39b6ff02e3b (diff) |
Don't set boot modules as targets
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/GHC/Typecheck.hs | 11 |
1 files changed, 7 insertions, 4 deletions
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) $ |