[commit: ghc] master: Fix #15953 by consistently using dumpIfSet_dyn to print debug output (dcf1f92)

git at git.haskell.org git at git.haskell.org
Fri Nov 30 00:45:40 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dcf1f9268f6b338997f2c03891d7bc57da2ee78a/ghc

>---------------------------------------------------------------

commit dcf1f9268f6b338997f2c03891d7bc57da2ee78a
Author: Chaitanya Koparkar <ckoparkar at gmail.com>
Date:   Thu Nov 29 18:45:07 2018 -0500

    Fix #15953 by consistently using dumpIfSet_dyn to print debug output
    
    Summary:
    In some modules we directly dump the debugging output to STDOUT
    via 'putLogMsg', 'printInfoForUser' etc. However, if `-ddump-to-file`
    is enabled, that output should be written to a file. Easily fixed.
    
    Certain tests (T3017, Roles3, T12763 etc.) expect part of the
    output generated by `-ddump-types` to be in 'PprUser' style. However,
    generally we want all other debugging output to use 'PprDump'
    style. `traceTcRn` and `traceTcRnForUser` help us accomplish this.
    
    This patch also documents some missing flags in the users guide.
    
    Reviewers: RyanGlScott, bgamari, hvr
    
    Reviewed By: RyanGlScott
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15953
    
    Differential Revision: https://phabricator.haskell.org/D5382


>---------------------------------------------------------------

dcf1f9268f6b338997f2c03891d7bc57da2ee78a
 compiler/deSugar/Coverage.hs               |  6 ++---
 compiler/ghci/Debugger.hs                  | 16 ++++--------
 compiler/main/ErrUtils.hs                  | 27 ++++++++++++++-----
 compiler/main/InteractiveEval.hs           |  6 ++---
 compiler/main/Packages.hs                  |  7 +++--
 compiler/main/TidyPgm.hs                   | 16 +++++-------
 compiler/simplCore/SimplMonad.hs           |  9 +++----
 compiler/typecheck/TcRnDriver.hs           |  2 +-
 compiler/typecheck/TcRnMonad.hs            | 32 ++++++++++++++++++-----
 docs/users_guide/debugging.rst             | 42 ++++++++++++++++++++++++++++++
 testsuite/tests/utils/should_run/Makefile  | 10 +++++++
 testsuite/tests/utils/should_run/T15953.hs |  9 +++++++
 testsuite/tests/utils/should_run/all.T     |  2 ++
 13 files changed, 133 insertions(+), 51 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc dcf1f9268f6b338997f2c03891d7bc57da2ee78a


More information about the ghc-commits mailing list