Ticket #3058: Add 'hex' to the pretty package (and other
thoughts)
Thomas DuBuisson
thomas.dubuisson at gmail.com
Sat Mar 14 11:22:15 EDT 2009
In a couple days it will be the two week mark and I'll be posting a
summary of this conversation on the ticket. At this point I don't see
any disagreement, just questions regarding the completeness of the
patch (so I included many more functions from Numeric). The final
type signatures are:
efloat :: (RealFloat a) => Maybe Int -> a -> Doc
ffloat :: (RealFloat a) => Maybe Int -> a -> Doc
gfloat :: (RealFloat a) => Maybe Int -> a -> Doc
hex :: (Integral a) => a -> Doc
hexPad :: (Integral a) => a -> Int -> Doc
intAtBase :: (Integral a) => a -> (Int -> Char) -> a -> Doc
intAtBasePad :: (Integral a) => a -> (Int -> Char) -> a -> Int -> Doc
oct :: (Integral a) => a -> Doc
octPad :: (Integral a) => Maybe Int -> a -> Int -> Doc
Which follows the Numeric module pretty close (except the *Pad
functions, which are obvious devivations).
Thomas
On Mon, Mar 2, 2009 at 7:01 PM, Thomas DuBuisson
<thomas.dubuisson at gmail.com> wrote:
>> > Padding floats could be touchy - perhaps it should be a separate patch
>> > by someone who would use such a feature and know what they want.
>> >
>> > Thoughts?
>>
>> Presumably it would be uncontroversial for the float ones to behave the
>> same as the ones from the existing Numeric module.
>
> Done, the new prettyNumeric.patch is with the ticket including hex, oct,
> ffloat, efloat, gfloat, signed, intByBase. Also, padded versions of
> hex, oct, intByBase.
>
> Thomas
>
>
More information about the Libraries
mailing list