Text.Printf replacement?
Evan Laforge
qdunkan at gmail.com
Tue Sep 10 23:31:09 CEST 2013
On Tue, Sep 10, 2013 at 2:16 PM, Joachim Breitner
<mail at joachim-breitner.de> wrote:
> Hi,
>
> Am Dienstag, den 10.09.2013, 14:14 -0700 schrieb Evan Laforge:
>> Can't we consider them separately? A new printf library is nice, and
>> so is moving printf out of base, but I don't see why one should hold
>> up the other.
>
> well, where to do you want to move it to, if not into a printf library.
> (I did not say that it has to be the new code; that indeed could be
> handled separately.)
Ah yes, sorry I misunderstood then :)
I only see two uses of printf in ghc:
ghc/InteractiveUI.hs: let nums = map (printf
"-%-3d:") [(1::Int)..]
compiler/utils/Outputable.lhs: ppr (Fingerprint w1 w2) = text
(printf "%016x%016x" w1 w2)
So it seems easy to replace that with some hand-written formatting.
If Bart's new printf is at least as good as the old one, then the
printf package could start with that as 1.0, otherwise just copy the
existing one, and Bart's new one would eventually become 2.0.
I guess everyone's package breaks until they add a new printf dep.
The new hackage says you can edit version constraints in-line, but
doesn't mention adding a new dependency.
More information about the Libraries
mailing list