removing warnings

This commit is contained in:
Kazu Yamamoto 2014-08-18 15:24:38 +09:00
parent c1cff13dc7
commit 5a657b9df8
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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