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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Prettyprinter.Symbols.Ascii

Description

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

Synopsis

- squotes :: Doc ann -> Doc ann
- dquotes :: Doc ann -> Doc ann
- parens :: Doc ann -> Doc ann
- angles :: Doc ann -> Doc ann
- brackets :: Doc ann -> Doc ann
- braces :: Doc ann -> Doc ann
- squote :: Doc ann
- dquote :: Doc ann
- lparen :: Doc ann
- rparen :: Doc ann
- langle :: Doc ann
- rangle :: Doc ann
- lbracket :: Doc ann
- rbracket :: Doc ann
- lbrace :: Doc ann
- rbrace :: Doc ann
- semi :: Doc ann
- colon :: Doc ann
- comma :: Doc ann
- space :: Doc ann
- dot :: Doc ann
- slash :: Doc ann
- backslash :: Doc ann
- equals :: Doc ann
- pipe :: Doc ann

# Documentation

squotes :: Doc ann -> Doc ann #

    >>> squotes "·"
    '·'

dquotes :: Doc ann -> Doc ann #

    >>> dquotes "·"
    "·"

parens :: Doc ann -> Doc ann #

    >>> parens "·"
    (·)

angles :: Doc ann -> Doc ann #

    >>> angles "·"
    <·>

brackets :: Doc ann -> Doc ann #

    >>> brackets "·"
    [·]

braces :: Doc ann -> Doc ann #

    >>> braces "·"
    {·}

squote :: Doc ann #

    >>> squote
    '

dquote :: Doc ann #

    >>> dquote
    "

lparen :: Doc ann #

    >>> lparen
    (

rparen :: Doc ann #

    >>> rparen
    )

langle :: Doc ann #

    >>> langle
    <

rangle :: Doc ann #

    >>> rangle
    >

lbracket :: Doc ann #

    >>> lbracket
    [

rbracket :: Doc ann #

    >>> rbracket
    ]

lbrace :: Doc ann #

    >>> lbrace
    {

rbrace :: Doc ann #

    >>> rbrace
    }

semi :: Doc ann #

    >>> semi
    ;

colon :: Doc ann #

    >>> colon
    :

comma :: Doc ann #

    >>> comma
    ,

space :: Doc ann #

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

This is mostly used via ``<+>``,

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

dot :: Doc ann #

    >>> dot
    .

slash :: Doc ann #

    >>> slash
    /

backslash :: Doc ann #

    >>> backslash
    \

equals :: Doc ann #

    >>> equals
    =

pipe :: Doc ann #

    >>> pipe
    |

(Definitions for the doctests)

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