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 :: Options -> String -> IO [String]
browse opt mdlName = withGHC $ do browse opt mdlName = withGHC $ do
initSession0 opt _ <- initSession0 opt
maybeNamesToStrings <$> lookupModuleInfo maybeNamesToStrings <$> lookupModuleInfo
where where
lookupModuleInfo = findModule (mkModuleName mdlName) Nothing >>= getModuleInfo lookupModuleInfo = findModule (mkModuleName mdlName) Nothing >>= getModuleInfo

View File

@ -23,8 +23,8 @@ check opt fileName = withGHC $ checkIt `gcatch` handleErrMsg
checkIt = do checkIt = do
(file,readLog) <- initializeGHC opt fileName options True (file,readLog) <- initializeGHC opt fileName options True
setTargetFile file setTargetFile file
load LoadAllTargets _ <- load LoadAllTargets
liftIO readLog liftIO readLog
options options
| expandSplice opt = ["-w:"] ++ ghcOpts opt | 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 let opts = map noLoc cmdOpts
(dflags',_,_) <- parseDynamicFlags dflags opts (dflags',_,_) <- parseDynamicFlags dflags opts
(dflags'',readLog) <- liftIO . (>>= setLogger logging) . setGhcFlags opt . setFlags opt dflags' $ idirs (dflags'',readLog) <- liftIO . (>>= setLogger logging) . setGhcFlags opt . setFlags opt dflags' $ idirs
setSessionDynFlags dflags'' _ <- setSessionDynFlags dflags''
return readLog return readLog
---------------------------------------------------------------- ----------------------------------------------------------------

View File

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

View File

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

View File

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