prettyprinter-1.6.2: A modern, easy to use, well-documented, extensible pretty-printer.

Safe HaskellSafe
LanguageHaskell2010

Data.Text.Prettyprint.Doc.Symbols.Ascii

Description

Common symbols composed out of the ASCII subset of Unicode. For non-ASCII symbols, see Data.Text.Prettyprint.Doc.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 Data.Text.Prettyprint.Doc.Render.Text
>>> import Data.Text.Prettyprint.Doc.Util