printf is:module

A C printf(3)-like formatter. This version has been extended by Bart Massey as per the recommendations of John Meacham and Simon Marlow http://comments.gmane.org/gmane.comp.lang.haskell.libraries/4726 to support extensible formatting for new datatypes. It has also been extended to support almost all C printf(3) syntax.
Input and output actions.
Text.Printf is a useful module, but due to the typeclass hacks it uses, it can be hard to tell if the format string you wrote is well-formed or not. This package provides a mechanism to create formatting functions at compile time. Note that, to maintain consistency with other printf implementations, negative ints that are printed as unsigned will "underflow". (Text.Printf does this too.)
>>> [s|%u|] (-1 :: Int32)
WAS "4294967295"
NOW Not in scope: type constructor or class `Int32'
Thus, any time you want to print a number using the unsigned, octal, or hex specifiers, your input must be an instance of Bounded.