From 5f0ee262e20f55951eb92a95b2925c0ab78914d8 Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 9 Oct 2008 23:53:54 +0000 Subject: Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. --- src/Main.hs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/Main.hs') 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 -- cgit v1.2.3