
On 2004-11-23, Lennart Augustsson
Being an old C programmer I'd like to suggest a library, Text.Printf, for C printf() style formatting.
Please take a look at MissingH.Printf: http://gopher.quux.org:70/devel/missingh/html/MissingH.Printf.html Downloads at: http://gopher.quux.org:70/devel/missingh It is a pure-Haskell implementation of Printf and friends. It derives some code from Ian Lynagh's printf in Template Haskell at http://web.comlab.ox.ac.uk/oucl/work/ian.lynagh/Printf/. There was a detailed thread on this last week. See http://www.haskell.org//pipermail/haskell-cafe/2004-November/007587.html There are some caveats of a pure Haskell approach, most notably type safety of the positional arguments. There is reportedly also a Printf written using hs-plugins. I would state right now that, if people want code in the standard library, I would be willing to relicense any GPL'd MissingH work to LGPL for inclusion in the standard library set. I'm also willing to remove dependencies on any other part of MissingH for Printf, if people want to use it as a place to start hacking for the standard library. -- John