format package:formatting

Run the formatter and return a lazy Text value.
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"
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"
Combinator-based type-safe formatting (like printf() or FORMAT) Combinator-based type-safe formatting (like printf() or FORMAT), modelled from the HoleyMonoids package. See the README at https://github.com/AJChapman/formatting#readme for more info.
Run the formatter and return a list of characters.
Makes it easy to add formatting to any api that is expecting a builder, a strict or lazy text, or a string. It is essentially (flip runFormat), but with a more generous type due to the typeclass. For example: >>> formatted TL.putStr ("x is: " % int % "n") 7 x is: 7 >>> formatted T.putStr ("x is: " % int % "n") 7 x is: 7 >>> formatted (id TL.Text) ("x is: " % int % "n") 7 "x is: 7n" >>> formatted (id T.Text) ("x is: " % int % "n") 7 "x is: 7n"
Combinator-based type-safe formatting (like printf() or FORMAT) for Text. Example:
>>> format ("Person's name is " % text % ", age is " % hex) "Dave" 54
"Person's name is Dave, age is 36"
See Formatting.Formatters for a list of formatters. See Formatting.Combinators for a list of formatting combinators, for combining and altering formatters.
Formatting functions.
Run the formatter and return a Builder value. This is a newer synonym for bprint, following the naming convention set by format and sformat.
Run the formatter and return a strict Text value.
Single letters for short formatting.