
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@cs.pdx.edu