Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains Formatable and VarContainer instances for most used types.
Utility data types
Container for single parameter. Example usage:
format "Hello, {}!" (Single name)
Eq a => Eq (Single a) Source # | |
Show a => Show (Single a) Source # | |
Formatable a => VarContainer (Single a) Source # | |
Formatable a => Formatable (Single a) Source # | |
Container for several parameters of the same type. Example usage:
format "{} + {} = {}" $ Several [2, 3, 5]
Several | |
|
Values packed in Shown will be formatted using their Show instance.
For example,
formatText "values: {}." (Shown (True, False)) ==> "values: (True, False)."
Generic formatters
genericIntFormat :: Integral a => VarFormat -> a -> Either String Builder Source #
Generic formatter for integer types
genericFloatFormat :: RealFloat a => VarFormat -> a -> Either String Builder Source #
Generic formatter for floating-point types