aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Haddock/Options.hs12
-rw-r--r--src/Main.hs5
2 files changed, 8 insertions, 9 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs
index 152b30d4..bfc8ae27 100644
--- a/src/Haddock/Options.hs
+++ b/src/Haddock/Options.hs
@@ -9,8 +9,8 @@ module Haddock.Options (
parseHaddockOpts,
Flag(..),
getUsage,
- getGhcFlags,
- getIfacePairs
+ ghcFlags,
+ ifacePairs
) where
@@ -37,12 +37,12 @@ parseHaddockOpts words =
throwE (concat errors ++ usage)
-getGhcFlags :: [Flag] -> [String]
-getGhcFlags flags = [ option | Flag_OptGhc option <- flags ]
+ghcFlags :: [Flag] -> [String]
+ghcFlags flags = [ option | Flag_OptGhc option <- flags ]
-getIfacePairs :: [Flag] -> [(FilePath, FilePath)]
-getIfacePairs flags = [ parseIfaceOption s | Flag_ReadInterface s <- flags ]
+ifacePairs :: [Flag] -> [(FilePath, FilePath)]
+ifacePairs flags = [ parseIfaceOption s | Flag_ReadInterface s <- flags ]
parseIfaceOption :: String -> (FilePath, FilePath)
diff --git a/src/Main.hs b/src/Main.hs
index 779da8f2..77bcbdbb 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -104,11 +104,10 @@ main = handleTopExceptions $ do
libDir <- handleEasyFlags flags fileArgs
-- initialize GHC
- let ghcFlags = getGhcFlags flags
- (session, dynflags) <- startGhc libDir ghcFlags
+ (session, dynflags) <- startGhc libDir (ghcFlags flags)
-- get packages via --read-interface
- packages <- readInterfaceFiles (getIfacePairs flags)
+ packages <- readInterfaceFiles (ifacePairs flags)
-- typecheck argument modules using GHC
modules <- typecheckFiles session fileArgs