adding options: --package-conf and --no-user-package-conf

These command line options work just like the similar-named GHC flags.
They are useful when working with non-standard package databases.
This commit is contained in:
Takano Akio
2011-05-28 05:43:52 +09:00
parent 92777ed539
commit ad55168265
7 changed files with 55 additions and 32 deletions

View File

@@ -10,11 +10,11 @@ import UniqFM
----------------------------------------------------------------
listModules :: Options -> IO String
listModules opt = convert opt . nub . sort <$> list
listModules opt = convert opt . nub . sort <$> list opt
list :: IO [String]
list = withGHC $ do
initSession0
list :: Options -> IO [String]
list opt = withGHC $ do
initSession0 opt
getExposedModules <$> getSessionDynFlags
where
getExposedModules = map moduleNameString