Commit 3d43fd5b authored by Andreas Klebinger's avatar Andreas Klebinger Committed by Ben Gamari

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
parent cb89ba88
......@@ -583,6 +583,7 @@ data GeneralFlag
| Opt_SuppressUniques
| Opt_SuppressStgFreeVars
| Opt_SuppressTicks -- Replaces Opt_PprShowTicks
| Opt_SuppressTimestamps -- ^ Suppress timestamps in dumps
-- temporary flags
| Opt_AutoLinkPackages
......@@ -3040,7 +3041,8 @@ dynamic_flags_deps = [
setGeneralFlag Opt_SuppressIdInfo
setGeneralFlag Opt_SuppressTicks
setGeneralFlag Opt_SuppressStgFreeVars
setGeneralFlag Opt_SuppressTypeSignatures)
setGeneralFlag Opt_SuppressTypeSignatures
setGeneralFlag Opt_SuppressTimestamps)
------ Debugging ----------------------------------------------------
, make_ord_flag defGhcFlag "dstg-stats"
......@@ -3835,10 +3837,12 @@ dFlagsDeps = [
flagSpec "suppress-idinfo" Opt_SuppressIdInfo,
flagSpec "suppress-unfoldings" Opt_SuppressUnfoldings,
flagSpec "suppress-module-prefixes" Opt_SuppressModulePrefixes,
flagSpec "suppress-timestamps" Opt_SuppressTimestamps,
flagSpec "suppress-type-applications" Opt_SuppressTypeApplications,
flagSpec "suppress-type-signatures" Opt_SuppressTypeSignatures,
flagSpec "suppress-uniques" Opt_SuppressUniques,
flagSpec "suppress-var-kinds" Opt_SuppressVarKinds]
flagSpec "suppress-var-kinds" Opt_SuppressVarKinds
]
-- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@
fFlags :: [FlagSpec GeneralFlag]
......
......@@ -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
......
......@@ -612,7 +612,7 @@ are doing, not all of it will be useful. Use these flags to suppress the
parts that you are not interested in.
.. ghc-flag:: -dsuppress-all
:shortdesc: In core dumps, suppress everything (except for uniques) that is
:shortdesc: In dumps, suppress everything (except for uniques) that is
suppressible.
:type: dynamic
......@@ -663,6 +663,13 @@ parts that you are not interested in.
Suppress the printing of module qualification prefixes. This is the
``Data.List`` in ``Data.List.length``.
.. ghc-flag:: -dsuppress-timestamps
:shortdesc: Suppress timestamps in dumps
:type: dynamic
Suppress the printing of timestamps.
This makes it easier to diff dumps.
.. ghc-flag:: -dsuppress-type-signatures
:shortdesc: Suppress type signatures
:type: dynamic
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment