From 5a657b9df88acc5128eba4b247b53ab7672f0fe2 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 18 Aug 2014 15:24:38 +0900 Subject: [PATCH] removing warnings --- Language/Haskell/GhcMod/CabalConfig.hs | 3 ++- Language/Haskell/GhcMod/Logger.hs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Language/Haskell/GhcMod/CabalConfig.hs b/Language/Haskell/GhcMod/CabalConfig.hs index ccc3334..01c3484 100644 --- a/Language/Haskell/GhcMod/CabalConfig.hs +++ b/Language/Haskell/GhcMod/CabalConfig.hs @@ -19,7 +19,6 @@ import qualified Language.Haskell.GhcMod.Cabal18 as C18 #define MIN_VERSION_mtl(x,y,z) 1 #endif -import MonadUtils (MonadIO(liftIO)) import Control.Applicative ((<$>)) import Control.Monad (mplus,void) #if MIN_VERSION_mtl(2,2,1) @@ -36,7 +35,9 @@ import Distribution.Package (InstalledPackageId(..) import Distribution.Simple.BuildPaths (defaultDistPref) import Distribution.Simple.Configure (localBuildInfoFile) import Distribution.Simple.LocalBuildInfo (ComponentName) +import MonadUtils (MonadIO) import System.FilePath (()) + ---------------------------------------------------------------- -- | 'Show'ed cabal 'LocalBuildInfo' string diff --git a/Language/Haskell/GhcMod/Logger.hs b/Language/Haskell/GhcMod/Logger.hs index 5e1d8df..e4d8492 100644 --- a/Language/Haskell/GhcMod/Logger.hs +++ b/Language/Haskell/GhcMod/Logger.hs @@ -71,7 +71,7 @@ readAndClearLogBagRef (LogBagRef ref) = do return b appendLogBagRef :: DynFlags -> LogBagRef -> DynFlags -> Severity -> SrcSpan -> PprStyle -> SDoc -> IO () -appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update +appendLogBagRef df (LogBagRef ref) _ _ src style msg = modifyIORef ref update where qstyle = (qualName style, qualModule style) #if __GLASGOW_HASKELL__ >= 706 @@ -80,8 +80,8 @@ appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update warnMsg = mkWarnMsg src qstyle msg #endif warnBag = consBag warnMsg emptyBag - update lg@(LogBag b) = let (b1,b2) = mergeErrors df style b warnBag - in LogBag $ b1 `unionBags` b2 + update (LogBag b) = let (b1,b2) = mergeErrors df style b warnBag + in LogBag $ b1 `unionBags` b2 ---------------------------------------------------------------- @@ -127,7 +127,7 @@ withLoggerTwice setDF1 body1 setDF2 body2 = do dflags <- G.getSessionDynFlags style <- getStyle case (err1, err2) of - (Right b1, Right b2) -> do let (warn1,warn2) = mergeErrors dflags style b1 b2 + (Right b1, Right b2) -> do let (warn1,_) = mergeErrors dflags style b1 b2 errAndWarnBagToStr Right emptyBag (warn1 `unionBags` b2) (Left b1, Right b2) -> do let (err,warn) = mergeErrors dflags style b1 b2 errAndWarnBagToStr Right err warn