getCompilerOptions handles package-db options.
This commit is contained in:
@@ -17,18 +17,16 @@ import Prelude
|
||||
-- | Obtaining debug information.
|
||||
debugInfo :: Options
|
||||
-> Cradle
|
||||
-> GHCVersion
|
||||
-> FilePath -- ^ A target file.
|
||||
-> IO String
|
||||
debugInfo opt cradle ver fileName = unlines <$> withGHC fileName (debug opt cradle ver fileName)
|
||||
debugInfo opt cradle fileName = unlines <$> withGHC fileName (debug opt cradle fileName)
|
||||
|
||||
-- | Obtaining debug information.
|
||||
debug :: Options
|
||||
-> Cradle
|
||||
-> GHCVersion
|
||||
-> FilePath -- ^ A target file.
|
||||
-> Ghc [String]
|
||||
debug opt cradle ver fileName = do
|
||||
debug opt cradle fileName = do
|
||||
CompilerOptions gopts incDir pkgs <-
|
||||
if cabal then
|
||||
liftIO (fromCabalFile ||> return simpleCompilerOption)
|
||||
@@ -39,8 +37,7 @@ debug opt cradle ver fileName = do
|
||||
setTargetFiles [fileName]
|
||||
pure . canCheckFast <$> depanal [] False
|
||||
return [
|
||||
"GHC version: " ++ ver
|
||||
, "Current directory: " ++ currentDir
|
||||
"Current directory: " ++ currentDir
|
||||
, "Cabal file: " ++ cabalFile
|
||||
, "GHC options: " ++ unwords gopts
|
||||
, "Include directories: " ++ unwords incDir
|
||||
|
||||
Reference in New Issue
Block a user