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:
8
Cabal.hs
8
Cabal.hs
@@ -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)
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user