[commit: ghc] master: Implement -dword-hex-literals (a00b88b)
git at git.haskell.org
git at git.haskell.org
Mon Mar 19 16:38:57 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/a00b88b9a27736c9c41f1921fcb6b7759ad8425e/ghc
>---------------------------------------------------------------
commit a00b88b9a27736c9c41f1921fcb6b7759ad8425e
Author: Andrew Martin <andrew.thaddeus at gmail.com>
Date: Mon Mar 19 12:01:17 2018 -0400
Implement -dword-hex-literals
Provide flag for showing showing Word# and Word64# as hexadecimal when
dumping GHC core. The only affects Word, not Int, and it prefixes the
hexadecimal with enough zeroes to make the total character count a power
of two. For example:
- 0x0C0C instead of 0xC0C
- 0x00BA00BA instead of 0xBA00BA
This also affects the presentation of Word# and Word64# in GHC's error
messages. It is not expected that the flag will be used for this, but
it is a side-effect worth noting.
Test Plan: none
Reviewers: bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, mpickering, rwbarton, thomie, carter, andrewthad
GHC Trac Issues: #14872
Differential Revision: https://phabricator.haskell.org/D4465
>---------------------------------------------------------------
a00b88b9a27736c9c41f1921fcb6b7759ad8425e
compiler/main/DynFlags.hs | 8 ++++++
compiler/main/DynFlags.hs-boot | 20 +++++++-------
compiler/utils/Outputable.hs | 15 ++++++++---
compiler/utils/Pretty.hs | 61 +++++++++++++++++++++++++++++++++++++++++-
docs/users_guide/debugging.rst | 14 ++++++++++
5 files changed, 104 insertions(+), 14 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 a00b88b9a27736c9c41f1921fcb6b7759ad8425e
More information about the ghc-commits
mailing list