From 38616254204eaac99116ef903a01d5ceda65da33 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 6 Aug 2012 09:43:47 +0900 Subject: [PATCH] Removing -fno-warn-unused-do-bind. --- Browse.hs | 2 +- Check.hs | 4 ++-- GHCApi.hs | 2 +- Info.hs | 6 +++--- List.hs | 2 +- ghc-mod.cabal | 5 +---- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Browse.hs b/Browse.hs index a0d2c9f..98d943f 100644 --- a/Browse.hs +++ b/Browse.hs @@ -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 diff --git a/Check.hs b/Check.hs index ce44437..0baa26e 100644 --- a/Check.hs +++ b/Check.hs @@ -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 diff --git a/GHCApi.hs b/GHCApi.hs index bdfc516..34f9d4c 100644 --- a/GHCApi.hs +++ b/GHCApi.hs @@ -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 ---------------------------------------------------------------- diff --git a/Info.hs b/Info.hs index c2be7b3..4143699 100644 --- a/Info.hs +++ b/Info.hs @@ -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 diff --git a/List.hs b/List.hs index fc60960..d4bf090 100644 --- a/List.hs +++ b/List.hs @@ -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 diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 22114a8..cf6ef8c 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -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