A formatter. When you construct formatters the first type parameter,
r, will remain polymorphic. The second type parameter,
a, will change to reflect the types of the data that will be
formatted. For example, in
myFormat :: Format r (Text -> Int -> r)
myFormat = "Person's name is " % text % ", age is " % hex
the first type parameter remains polymorphic, and the second type
parameter is
Text -> Int -> r, which indicates that it
formats a
Text and an
Int.
When you run the
Format, for example with
format, you
provide the arguments and they will be formatted into a string.
> format ("Person's name is " % text % ", age is " % hex) "Dave" 54
"Person's name is Dave, age is 36"