fmt-0.6.1.2: A new formatting library
Safe Haskell None
Language Haskell2010

Fmt.Internal.Core

Synopsis

Documentation

(+|) :: FromBuilder b => Builder -> Builder -> b infixr 1 Source #

Concatenate, then convert.

(|+) :: ( Buildable a, FromBuilder b) => a -> Builder -> b infixr 1 Source #

build and concatenate, then convert.

(+||) :: FromBuilder b => Builder -> Builder -> b infixr 1 Source #

Concatenate, then convert.

(||+) :: ( Show a, FromBuilder b) => a -> Builder -> b infixr 1 Source #

show and concatenate, then convert.

fmt :: FromBuilder b => Builder -> b Source #

fmt converts things to String , Text , ByteString or Builder .

Most of the time you won't need it, as strings produced with ( +| ) and ( |+ ) can already be used as String , Text , etc. However, combinators like listF can only produce Builder (for better type inference), and you need to use fmt on them.

Also, fmt can do printing:

>>> fmt "Hello world!\n"
Hello world!

fmtLn :: FromBuilder b => Builder -> b Source #

Like fmt , but appends a newline.

pretty :: ( Buildable a, FromBuilder b) => a -> b Source #

pretty shows a value using its Buildable instance.

prettyLn :: ( Buildable a, FromBuilder b) => a -> b Source #

Like pretty , but appends a newline.