Proposal: Replace Text.Printf with extensible, complete version

Bart Massey bart at cs.pdx.edu
Tue Sep 17 03:28:15 CEST 2013


Greetings. This proposal is an extension of previous discussion on the
libraries list about replacing Text.Printf with my updated version
that provides extensibility of printf to user datatypes and implements
much more of the C printf spec, while maintaining
backward-compatibility with existing users of printf.

There is a separable proposal to move Text.Printf from base into its
own package. I support that proposal, but believe that we can take
them in either order, and this is the part I know how to do :-).

Attached please find a patch that implements the proposal. Note that
it also makes slight, backward-compatible modification to Numeric and
GHC.Float to avoid a whole bunch of pointless code duplication. The
printf patch is kind of ugly because so much of Text/Printf.hs has
been replaced. Let me know if it would be better to just provide the
whole source. The patch applies and builds against my current
top-of-tree GHC.

While I would welcome shortening the discussion given how much has
already been discussed, Monday 30 September is two weeks from today,
so I will treat that as the discussion deadline unless I hear
otherwise.

Thanks much for the potential opportunity to contribute to the Haskell
libraries!

Bart Massey
bart at cs.pdx.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-replaced-Text.Printf-with-extensible-printf-and-made.patch
Type: application/octet-stream
Size: 42845 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130916/a065167a/attachment.obj>


More information about the Libraries mailing list