Safe Haskell | None |
---|---|
Language | Haskell2010 |
- format :: VarContainer vars => Format -> vars -> Text
- formatEither :: VarContainer vars => Format -> vars -> Either String Text
- makeBuilder :: VarContainer c => Format -> c -> Either String Builder
- align :: GenericFormat -> Builder -> Builder
- applySign :: (Num a, Ord a) => Sign -> a -> Builder -> Builder
- applySharp :: Bool -> Radix -> Builder -> Builder
- formatInt :: Integral a => GenericFormat -> a -> Builder
- formatStr :: GenericFormat -> Text -> Builder
- formatFloat :: RealFloat a => GenericFormat -> a -> Builder
- formatBool :: BoolFormat -> Bool -> Builder
Documentation
format :: VarContainer vars => Format -> vars -> Text Source #
The main formatting function.
This function throws error
if some error detected during format string parsing or formatting itself.
formatEither :: VarContainer vars => Format -> vars -> Either String Text Source #
The main formatting function.
This version returns Left
value with error description in case of error in
format string or error during formatting.
makeBuilder :: VarContainer c => Format -> c -> Either String Builder Source #
Formatters building utilities
align :: GenericFormat -> Builder -> Builder Source #
Align text within available width according to format
applySign :: (Num a, Ord a) => Sign -> a -> Builder -> Builder Source #
Add +/-
sign to the number representation, if required
applySharp :: Bool -> Radix -> Builder -> Builder Source #
Add 0x
to the number representation, if required
formatInt :: Integral a => GenericFormat -> a -> Builder Source #
Format integer number according to GenericFormat
formatFloat :: RealFloat a => GenericFormat -> a -> Builder Source #
Format floating-point number according to GenericFormat
formatBool :: BoolFormat -> Bool -> Builder Source #
Format boolean value.