formatting-3.1.0: Combinator-based type-safe formatting (like printf() or FORMAT)

PortabilityGHC
Stabilityexperimental
Maintainerchrisdone@gmail.com
Safe HaskellNone

Formatting.ShortFormatters

Description

Single letters for short formatting.

Synopsis

Documentation

t :: Format TextSource

Output a lazy text.

x :: Format IntegerSource

Render an integer using hexadecimal notation. (No leading 0x is added.)

st :: Format TextSource

Output a strict text.

s :: Format StringSource

Output a string.

ef :: 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.

f :: Real a => Int -> Format aSource

Render a floating point number using normal notation, with the given number of decimal places.

pf :: 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.

sf :: Real a => Format aSource

Render a floating point number using the smallest number of digits that correctly represent it.

l :: Buildable a => Int -> Char -> Format aSource

Pad the left hand side of a string until it reaches k characters wide, if necessary filling with character c.

r :: Buildable a => Int -> Char -> Format aSource

Pad the right hand side of a string until it reaches k characters wide, if necessary filling with character c.