aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Haddock.hs16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Haddock.hs b/src/Haddock.hs
index f3535fb1..c53b4543 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -144,8 +144,11 @@ haddock args = handleTopExceptions $ do
(packages, ifaces, homeLinks) <- readPackagesAndProcessModules flags files
-- Dump an "interface file" (.haddock file), if requested.
- forM_ (optDumpInterfaceFile flags) $ \f -> do
- liftIO $ dumpInterfaceFile f (map toInstalledIface ifaces) homeLinks
+ forM_ (optDumpInterfaceFile flags) $ \path -> liftIO $ do
+ writeInterfaceFile path InterfaceFile {
+ ifInstalledIfaces = map toInstalledIface ifaces
+ , ifLinkEnv = homeLinks
+ }
-- Render the interfaces.
liftIO $ renderStep dflags flags qual packages ifaces
@@ -284,15 +287,6 @@ readInterfaceFiles name_cache_accessor pairs = do
Right f -> return $ Just (paths, f)
-dumpInterfaceFile :: FilePath -> [InstalledInterface] -> LinkEnv -> IO ()
-dumpInterfaceFile path ifaces homeLinks = writeInterfaceFile path ifaceFile
- where
- ifaceFile = InterfaceFile {
- ifInstalledIfaces = ifaces,
- ifLinkEnv = homeLinks
- }
-
-
-------------------------------------------------------------------------------
-- * Creating a GHC session
-------------------------------------------------------------------------------