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

@@ -15,12 +15,12 @@ import Types
----------------------------------------------------------------
initializeGHC :: FilePath -> [String] -> Ghc FilePath
initializeGHC fileName options = do
initializeGHC :: Options -> FilePath -> [String] -> Ghc FilePath
initializeGHC opt fileName ghcOptions = do
(owdir,mdirfile) <- getDirs
case mdirfile of
Nothing -> do
initSession options Nothing
initSession opt ghcOptions Nothing
return fileName
Just (cdir,cfile) -> do
midirs <- parseCabalFile cfile
@@ -28,7 +28,7 @@ initializeGHC fileName options = do
let idirs = case midirs of
Nothing -> [cdir,owdir]
Just dirs -> dirs ++ [owdir]
initSession options (Just idirs)
initSession opt ghcOptions (Just idirs)
return (ajustFileName fileName owdir cdir)
----------------------------------------------------------------