prettyprinter-1.7.1: A modern, easy to use, well-documented, extensible pretty-printer.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Prettyprinter.Symbols.Ascii

Description

Common symbols composed out of the ASCII subset of Unicode. For non-ASCII symbols, see Prettyprinter.Symbols.Unicode.

Synopsis

Documentation

squotes :: Doc ann -> Doc ann Source #

>>> squotes "·"
'·'

dquotes :: Doc ann -> Doc ann Source #

>>> dquotes "·"
"·"

parens :: Doc ann -> Doc ann Source #

>>> parens "·"
(·)

angles :: Doc ann -> Doc ann Source #

>>> angles "·"
<·>

brackets :: Doc ann -> Doc ann Source #

>>> brackets "·"
[·]

braces :: Doc ann -> Doc ann Source #

>>> braces "·"
{·}

squote :: Doc ann Source #

>>> squote
'

dquote :: Doc ann Source #

>>> dquote
"

lparen :: Doc ann Source #

>>> lparen
(

rparen :: Doc ann Source #

>>> rparen
)

langle :: Doc ann Source #

>>> langle
<

rangle :: Doc ann Source #

>>> rangle
>

lbracket :: Doc ann Source #

>>> lbracket
[

rbracket :: Doc ann Source #

>>> rbracket
]

lbrace :: Doc ann Source #

>>> lbrace
{

rbrace :: Doc ann Source #

>>> rbrace
}

semi :: Doc ann Source #

>>> semi
;

colon :: Doc ann Source #

>>> colon
:

comma :: Doc ann Source #

>>> comma
,

space :: Doc ann Source #

>>> "a" <> space <> "b"
a b

This is mostly used via <+>,

>>> "a" <+> "b"
a b

dot :: Doc ann Source #

>>> dot
.

slash :: Doc ann Source #

>>> slash
/

backslash :: Doc ann Source #

>>> backslash
\

equals :: Doc ann Source #

>>> equals
=

pipe :: Doc ann Source #

>>> pipe
|

(Definitions for the doctests)

>>> :set -XOverloadedStrings
>>> import Data.Semigroup
>>> import Prettyprinter.Render.Text
>>> import Prettyprinter.Util