aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 3d0faa31..dce204d1 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -167,22 +167,18 @@ main = handleTopExceptions $ do
-- get packages supplied with --read-interface
packages <- readInterfaceFiles nameCacheFromGhc (ifacePairs flags)
- -- typecheck argument modules using GHC
- modules <- typecheckFiles fileArgs
-
-- combine the link envs of the external packages into one
let extLinks = Map.unions (map (ifLinkEnv . fst) packages)
- liftIO $ do
-- create the interfaces -- this is the core part of Haddock
- let (interfaces, homeLinks, messages) = createInterfaces modules extLinks flags
- mapM_ putStrLn messages
+ (interfaces, homeLinks) <- createInterfaces fileArgs extLinks flags
- -- render the interfaces
- renderStep packages interfaces
+ liftIO $ do
+ -- render the interfaces
+ renderStep packages interfaces
- -- last but not least, dump the interface file
- dumpInterfaceFile (map toInstalledIface interfaces) homeLinks flags
+ -- last but not least, dump the interface file
+ dumpInterfaceFile (map toInstalledIface interfaces) homeLinks flags
else do
-- get packages supplied with --read-interface