hindent-6.0.0: Extensible Haskell pretty printer
Safe HaskellSafe-Inferred
LanguageHaskell2010

HIndent.Pretty.Combinators.Wrap

Description

Printer operators for wrapping texts with a prefix and a suffix.

Synopsis

Documentation

parens :: Printer a -> Printer a Source #

This function wraps the printer with parentheses.

parensIfSymbol :: OccName -> Printer a -> Printer a Source #

This function wraps the printer with parentheses if the identifier contains only symbols.

bananaBrackets :: Printer a -> Printer a Source #

Wraps with "(|" and "|)"

braces :: Printer a -> Printer a Source #

This function wraps the printer with braces.

doubleQuotes :: Printer a -> Printer a Source #

Wraps with double quotes.

brackets :: Printer a -> Printer a Source #

This function wraps the printer with brackets.

typedBrackets :: Printer a -> Printer a Source #

Wraps with [|| and ||].

backticks :: Printer a -> Printer a Source #

This function wraps the printer with backticks.

backticksIfNotSymbol :: OccName -> Printer a -> Printer a Source #

This function wraps the printer with backticks if the identifier contains at least one non-symbol character.

wrapWithBars :: Printer a -> Printer a Source #

This function wraps the printer with bars (|).

promotedListBrackets :: Printer a -> Printer a Source #

This function wraps the printer with '[ and ] for a promoted list.

promotedTupleParens :: Printer a -> Printer a Source #

This function wraps the printer with '( and ) for a promoted tuple.

unboxedParens :: Printer a -> Printer a Source #

Wraps with (# and #).