diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2018-02-20 13:19:19 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-02-25 16:25:19 -0500 |
commit | 3d43fd5b816a980d650d98f5822831dfce38f658 (patch) | |
tree | 169c8cc0b1a835589a4a3a1419ae30fed42cd1e0 /compiler/main/ErrUtils.hs | |
parent | cb89ba88d42ab77f9e20d722ec1ab40ec6f8e703 (diff) | |
download | haskell-3d43fd5b816a980d650d98f5822831dfce38f658.tar.gz |
Introduce the flag -dsuppress-timestamps to avoid timestamps in dumps.
This makes it easier to diff dumps which are otherwise identical.
Also updated the description of -dsuppress-all as parts of these also
apply to stages other than core.
Test Plan: Looking at dump result.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4429
Diffstat (limited to 'compiler/main/ErrUtils.hs')
-rw-r--r-- | compiler/main/ErrUtils.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index 13ff017e09..c7fb8babe9 100644 --- a/compiler/main/ErrUtils.hs +++ b/compiler/main/ErrUtils.hs @@ -500,9 +500,12 @@ dumpSDoc dflags print_unqual flag hdr doc = doc' <- if null hdr then return doc else do t <- getCurrentTime - let d = text (show t) - $$ blankLine - $$ doc + let timeStamp = if (gopt Opt_SuppressTimestamps dflags) + then empty + else text (show t) + let d = timeStamp + $$ blankLine + $$ doc return $ mkDumpDoc hdr d defaultLogActionHPrintDoc dflags handle doc' dump_style |