diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-07-17 16:11:02 +0100 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-07-18 11:50:03 +0100 |
commit | f8a00d0e4ac1f94f6ccf3da3ee6c208cdbce8d65 (patch) | |
tree | 3c113eeedc97985a6b299dfd8e1ee0c253e7a243 /compiler/main/ErrUtils.lhs | |
parent | 3ae9f0f97583a3084a76cf7e31931bd9ef5f4173 (diff) | |
download | haskell-f8a00d0e4ac1f94f6ccf3da3ee6c208cdbce8d65.tar.gz |
Restore old output for -ddump-rule-firings #7060
Commit 3fcf5bdff7a22e22d7265535369cd8f867141ec1 made the output of
-ddump-rule-firings and -ddump-rule-rewrites excessively verbose.
Fixed by removing the extra blank lines and separator when the header
of dump is empty.
Diffstat (limited to 'compiler/main/ErrUtils.lhs')
-rw-r--r-- | compiler/main/ErrUtils.lhs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs index daa66f9d2f..84722aa74a 100644 --- a/compiler/main/ErrUtils.lhs +++ b/compiler/main/ErrUtils.lhs @@ -251,8 +251,11 @@ dumpSDoc dflags dflag hdr doc hClose handle -- write the dump to stdout - Nothing - -> log_action dflags dflags SevDump noSrcSpan defaultDumpStyle (mkDumpDoc hdr doc) + Nothing -> do + let (doc', severity) + | null hdr = (doc, SevOutput) + | otherwise = (mkDumpDoc hdr doc, SevDump) + log_action dflags dflags severity noSrcSpan defaultDumpStyle doc' -- | Choose where to put a dump file based on DynFlags |