diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-10-28 16:15:24 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-31 19:01:54 -0400 |
commit | 337e9b5adb58cf1a8c4daf76ac286126f2871ad7 (patch) | |
tree | 361211734f6a4acac0494636f9dab81617e56dd5 /libraries/ghc-heap | |
parent | 4898df1cc25132dc9e2599d4fa4e1bbc9423cda5 (diff) | |
download | haskell-337e9b5adb58cf1a8c4daf76ac286126f2871ad7.tar.gz |
Remove redundant 0s in ghc-heap pointer strings
Before: 0x0000004200c86888
After: 0x42000224f8
This is more concise and consistent with the RTS's printer (which uses
%p formatter, and at least on Linux gcc prints the short form) and gdb's
pointer formatter.
Diffstat (limited to 'libraries/ghc-heap')
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap/Closures.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs index 82d0790f43..b247266a10 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs @@ -70,9 +70,7 @@ instance Show Box where ptr = W# (aToWord# a) tag = ptr .&. fromIntegral tAG_MASK -- ((1 `shiftL` TAG_BITS) -1) addr = ptr - tag - -- want 0s prefixed to pad it out to a fixed length. - pad_out ls = - '0':'x':(replicate (2*wORD_SIZE - length ls) '0') ++ ls + pad_out ls = '0':'x':ls -- |This takes an arbitrary value and puts it into a box. -- Note that calls like |