Fix for GHC 7.4

This commit is contained in:
Alejandro Serrano 2014-08-15 10:46:52 +02:00
parent f584bf5d5b
commit 57db768ed0
1 changed files with 4 additions and 0 deletions

View File

@ -74,7 +74,11 @@ appendLogBagRef :: DynFlags -> LogBagRef -> DynFlags -> Severity -> SrcSpan -> P
appendLogBagRef df (LogBagRef ref) _ sev src style msg = modifyIORef ref update
where
qstyle = (qualName style, qualModule style)
#if __GLASGOW_HASKELL__ >= 706
warnMsg = mkWarnMsg df src qstyle msg
#else
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