Removing -fno-warn-unused-do-bind.

This commit is contained in:
Kazu Yamamoto 2012-08-06 09:43:47 +09:00
parent 256eec740c
commit 3861625420
6 changed files with 9 additions and 12 deletions

View File

@ -25,7 +25,7 @@ browseModule opt mdlName = convert opt . format <$> browse opt mdlName
browse :: Options -> String -> IO [String]
browse opt mdlName = withGHC $ do
initSession0 opt
_ <- initSession0 opt
maybeNamesToStrings <$> lookupModuleInfo
where
lookupModuleInfo = findModule (mkModuleName mdlName) Nothing >>= getModuleInfo

View File

@ -23,8 +23,8 @@ check opt fileName = withGHC $ checkIt `gcatch` handleErrMsg
checkIt = do
(file,readLog) <- initializeGHC opt fileName options True
setTargetFile file
load LoadAllTargets
_ <- load LoadAllTargets
liftIO readLog
options
| expandSplice opt = ["-w:"] ++ ghcOpts opt
| otherwise = ["-Wall","-fno-warn-unused-do-bind"] ++ ghcOpts opt
| otherwise = ["-Wall"] ++ ghcOpts opt

View File

@ -37,7 +37,7 @@ initSession opt cmdOpts idirs logging = do
let opts = map noLoc cmdOpts
(dflags',_,_) <- parseDynamicFlags dflags opts
(dflags'',readLog) <- liftIO . (>>= setLogger logging) . setGhcFlags opt . setFlags opt dflags' $ idirs
setSessionDynFlags dflags''
_ <- setSessionDynFlags dflags''
return readLog
----------------------------------------------------------------

View File

@ -144,12 +144,12 @@ inModuleContext opt fileName modstr action errmsg =
valid = do
(file,_) <- initializeGHC opt fileName ["-w"] False
setTargetFile file
load LoadAllTargets
_ <- load LoadAllTargets
doif setContextFromTarget action
invalid = do
initializeGHC opt fileName ["-w"] False
_ <- initializeGHC opt fileName ["-w"] False
setTargetBuffer
load LoadAllTargets
_ <- load LoadAllTargets
doif setContextFromTarget action
setTargetBuffer = do
modgraph <- depanal [mkModuleName modstr] True

View File

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

View File

@ -42,10 +42,7 @@ Executable ghc-mod
List
Paths_ghc_mod
Types
if impl(ghc >= 6.12)
GHC-Options: -Wall -fno-warn-unused-do-bind
else
GHC-Options: -Wall
GHC-Options: -Wall
Build-Depends: base >= 4.0 && < 5
, Cabal
, directory