Portability | GHC |
---|---|
Stability | experimental |
Maintainer | chrisdone@gmail.com |
Safe Haskell | None |
Formatting functions.
- text :: Format Text
- hex :: Format Integer
- stext :: Format Text
- string :: Format String
- expt :: Real a => Int -> Format a
- fixed :: Real a => Int -> Format a
- prec :: Real a => Int -> Format a
- shortest :: Real a => Format a
- left :: Buildable a => Int -> Char -> Format a
- right :: Buildable a => Int -> Char -> Format a
Formatters
expt :: Real a => Int -> Format aSource
Render a floating point number using scientific/engineering notation (e.g. 2.3e123), with the given number of decimal places.
fixed :: Real a => Int -> Format aSource
Render a floating point number using normal notation, with the given number of decimal places.
prec :: Real a => Int -> Format aSource
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.
shortest :: Real a => Format aSource
Render a floating point number using the smallest number of digits that correctly represent it.