Opened 5 years ago

Closed 4 years ago

#3058 closed proposal (wontfix)

Add a 'hex' function to the pretty printing

Reported by: TomMD Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/base Version:
Keywords: pretty, prettyprint, library Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Attached is a patch for Text.PrettyPrint.HughesPJ that adds a 'hex' function to print hexidecimal numbers.

The only point that I exepect to be contended is it varies slightly from the surrounding functions in that it allows one to control the number of characters printed (see below).

hex 5 31

0001f

hex 2 8

08

hex 3 7495

d47

While we can argue about the consistancy issues, I almost always want to control the number of digits when I'm dealing with hex. Hence I feel this is a reasonable special case.

Attachments (2)

prettyPrintHex.patch (991 bytes) - added by TomMD 5 years ago.
Adds 'hex', removes old code that belongs in a darcs repo
prettyNumeric.patch (6.1 KB) - added by TomMD 5 years ago.
The Numeric patch adding ord, hex, etc.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by TomMD

Adds 'hex', removes old code that belongs in a darcs repo

Changed 5 years ago by TomMD

The Numeric patch adding ord, hex, etc.

comment:1 Changed 5 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to Not GHC

comment:2 Changed 4 years ago by igloo

  • Resolution set to wontfix
  • Status changed from new to closed
  • Type of failure set to None/Unknown

Looks like an abandoned proposal

Note: See TracTickets for help on using tickets.