Fix for GHC 7.4

This commit is contained in:
Alejandro Serrano 2014-08-15 10:46:52 +02:00
parent f584bf5d5b
commit 57db768ed0

View File

@ -74,7 +74,11 @@ appendLogBagRef :: DynFlags -> LogBagRef -> DynFlags -> Severity -> SrcSpan -> P
appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update
where where
qstyle = (qualName style, qualModule style) qstyle = (qualName style, qualModule style)
#if __GLASGOW_HASKELL__ >= 706
warnMsg = mkWarnMsg df src qstyle msg warnMsg = mkWarnMsg df src qstyle msg
#else
warnMsg = mkWarnMsg src qstyle msg
#endif
warnBag = consBag warnMsg emptyBag warnBag = consBag warnMsg emptyBag
update lg@(LogBag b) = let (b1,b2) = mergeErrors df style b warnBag update lg@(LogBag b) = let (b1,b2) = mergeErrors df style b warnBag
in LogBag $ b1 `unionBags` b2 in LogBag $ b1 `unionBags` b2