removing warnings
This commit is contained in:
parent
c1cff13dc7
commit
5a657b9df8
@ -19,7 +19,6 @@ import qualified Language.Haskell.GhcMod.Cabal18 as C18
|
|||||||
#define MIN_VERSION_mtl(x,y,z) 1
|
#define MIN_VERSION_mtl(x,y,z) 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
import MonadUtils (MonadIO(liftIO))
|
|
||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
import Control.Monad (mplus,void)
|
import Control.Monad (mplus,void)
|
||||||
#if MIN_VERSION_mtl(2,2,1)
|
#if MIN_VERSION_mtl(2,2,1)
|
||||||
@ -36,7 +35,9 @@ import Distribution.Package (InstalledPackageId(..)
|
|||||||
import Distribution.Simple.BuildPaths (defaultDistPref)
|
import Distribution.Simple.BuildPaths (defaultDistPref)
|
||||||
import Distribution.Simple.Configure (localBuildInfoFile)
|
import Distribution.Simple.Configure (localBuildInfoFile)
|
||||||
import Distribution.Simple.LocalBuildInfo (ComponentName)
|
import Distribution.Simple.LocalBuildInfo (ComponentName)
|
||||||
|
import MonadUtils (MonadIO)
|
||||||
import System.FilePath ((</>))
|
import System.FilePath ((</>))
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
-- | 'Show'ed cabal 'LocalBuildInfo' string
|
-- | 'Show'ed cabal 'LocalBuildInfo' string
|
||||||
|
@ -71,7 +71,7 @@ readAndClearLogBagRef (LogBagRef ref) = do
|
|||||||
return b
|
return b
|
||||||
|
|
||||||
appendLogBagRef :: DynFlags -> LogBagRef -> DynFlags -> Severity -> SrcSpan -> PprStyle -> SDoc -> IO ()
|
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
|
where
|
||||||
qstyle = (qualName style, qualModule style)
|
qstyle = (qualName style, qualModule style)
|
||||||
#if __GLASGOW_HASKELL__ >= 706
|
#if __GLASGOW_HASKELL__ >= 706
|
||||||
@ -80,8 +80,8 @@ appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update
|
|||||||
warnMsg = mkWarnMsg src qstyle msg
|
warnMsg = mkWarnMsg src qstyle msg
|
||||||
#endif
|
#endif
|
||||||
warnBag = consBag warnMsg emptyBag
|
warnBag = consBag warnMsg emptyBag
|
||||||
update lg@(LogBag b) = let (b1,b2) = mergeErrors df style b warnBag
|
update (LogBag b) = let (b1,b2) = mergeErrors df style b warnBag
|
||||||
in LogBag $ b1 `unionBags` b2
|
in LogBag $ b1 `unionBags` b2
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ withLoggerTwice setDF1 body1 setDF2 body2 = do
|
|||||||
dflags <- G.getSessionDynFlags
|
dflags <- G.getSessionDynFlags
|
||||||
style <- getStyle
|
style <- getStyle
|
||||||
case (err1, err2) of
|
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)
|
errAndWarnBagToStr Right emptyBag (warn1 `unionBags` b2)
|
||||||
(Left b1, Right b2) -> do let (err,warn) = mergeErrors dflags style b1 b2
|
(Left b1, Right b2) -> do let (err,warn) = mergeErrors dflags style b1 b2
|
||||||
errAndWarnBagToStr Right err warn
|
errAndWarnBagToStr Right err warn
|
||||||
|
Loading…
Reference in New Issue
Block a user