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

PortabilityGHC
Stabilityexperimental
Maintainerchrisdone@gmail.com
Safe HaskellNone

Formatting

Contents

Description

Combinator-based type-safe formatting (like printf() or FORMAT) for Text.

Example:

>>> format ("Person's name is " % text % ", age is " % hex) "Dave" 54

See Formatting.Formatters for a complete list of formatting combinators.

Synopsis

Top-level functions

format :: Holey Builder Text a -> aSource

Run the formatter and return a Text value.

bprint :: Holey Builder Builder a -> aSource

Run the formatter and return a Builder value.

fprint :: Holey Builder (IO ()) a -> aSource

Run the formatter and print out the text to stdout.

hprint :: Handle -> Holey Builder (IO ()) a -> aSource

Run the formatter and put the output onto the given Handle.

Formatting library