aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/GHC/Typecheck.hs11
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) $