Copyright | (c) 2013 Chris Done, 2013 Shachaf Ben-Kiki |
---|---|
License | BSD3 |
Maintainer | chrisdone@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell98 |
Single letters for short formatting.
- t :: Format Text
- d :: Integral a => Format a
- b :: Integral a => Format a
- o :: Integral a => Format a
- x :: Integral a => Format a
- st :: Format Text
- s :: Format String
- sh :: Show a => Format a
- c :: Format Char
- ef :: Real a => Int -> Format a
- f :: Real a => Int -> Format a
- pf :: Real a => Int -> Format a
- sf :: Real a => Format a
- l :: Buildable a => Int -> Char -> Format a
- r :: Buildable a => Int -> Char -> Format a
Documentation
b :: Integral a => Format a Source
Render an integer using binary notation. (No leading 0b is added.)
x :: Integral a => Format a Source
Render an integer using hexadecimal notation. (No leading 0x is added.)
ef :: Real a => Int -> Format a Source
Render a floating point number using scientific/engineering notation (e.g. 2.3e123), with the given number of decimal places.
f :: Real a => Int -> Format a Source
Render a floating point number using normal notation, with the given number of decimal places.
pf :: Real a => Int -> Format a Source
Render a floating point number, with the given number of digits of precision. Uses decimal notation for values between 0.1 and 9,999,999, and scientific notation otherwise.
sf :: Real a => Format a Source
Render a floating point number using the smallest number of digits that correctly represent it.