Module

Options.Applicative.Help.Pretty

Package
purescript-optparse
Repository
f-o-a-m/purescript-optparse

#(.$.) Source

Operator alias for Text.PrettyPrint.Leijen.appendWithLine (right-associative / precedence 5)

Re-exports from Text.PrettyPrint.Leijen

#SimpleDoc Source

data SimpleDoc

The data type @SimpleDoc@ represents rendered documents and is

Constructors

Instances

#Docs Source

data Docs

Constructors

#Doc Source

data Doc

The abstract data type @Doc@ represents pretty documents.

Constructors

Instances

#width Source

width :: Doc -> (Int -> Doc) -> Doc

#vsep Source

vsep :: Array Doc -> Doc

The document @(vsep xs)@ concatenates all documents @xs@

#vcat Source

vcat :: Array Doc -> Doc

The document @(vcat xs)@ concatenates all documents @xs@

#tupled Source

tupled :: Array Doc -> Doc

The document @(tupled xs)@ comma separates the documents @xs@ and

#text Source

text :: String -> Doc

The document @(text s)@ contains the literal string @s@. The

#string Source

string :: String -> Doc

The document @(string s)@ concatenates all characters in @s@

#squotes Source

squotes :: Doc -> Doc

Document @(squotes x)@ encloses document @x@ with single quotes

#squote Source

squote :: Doc

The document @squote@ contains a single quote, "'".

#spaces Source

#space Source

space :: Doc

The document @space@ contains a single space, " ".

#softline Source

softline :: Doc

The document @softline@ behaves like 'space' if the resulting

#softbreak Source

softbreak :: Doc

The document @softbreak@ behaves like 'empty' if the resulting

#sep Source

sep :: Array Doc -> Doc

The document @(sep xs)@ concatenates all documents @xs@ either

#semiBraces Source

semiBraces :: Array Doc -> Doc

The document @(semiBraces xs)@ separates the documents @xs@ with

#semi Source

semi :: Doc

The document @semi@ contains a semicolon, ";".

#rparen Source

rparen :: Doc

The document @rparen@ contains a right parenthesis, ")".

#renderSmart Source

renderSmart :: Number -> Int -> Doc -> SimpleDoc

A slightly smarter rendering algorithm with more lookahead. It provides abcdef, abcdef,

#renderPretty Source

renderPretty :: Number -> Int -> Doc -> SimpleDoc

This is the default pretty printer which is used by 'show',

#renderFits Source

renderFits :: (Int -> Int -> Int -> SimpleDoc -> Boolean) -> Number -> Int -> Doc -> SimpleDoc

#renderCompact Source

renderCompact :: Doc -> SimpleDoc

@(renderCompact x)@ renders document @x@ without adding any

#rbracket Source

rbracket :: Doc

The document @rbracket@ contains a right square bracket, "]".

#rbrace Source

rbrace :: Doc

The document @rbrace@ contains a right brace, "}".

#rangle Source

rangle :: Doc

The document @rangle@ contains a right angle, ">".

#punctuate Source

punctuate :: Doc -> Array Doc -> Array Doc

@(punctuate p xs)@ concatenates all documents in @xs@ with

#parens Source

parens :: Doc -> Doc

Document @(parens x)@ encloses document @x@ in parenthesis, "("

#number Source

number :: Number -> Doc

The document @(number f)@ shows the literal number @f@ using 'text'.

#nesting Source

nesting :: (Int -> Doc) -> Doc

#nest Source

nest :: Int -> Doc -> Doc

The document @(nest i x)@ renders document @x@ with the current

#lparen Source

lparen :: Doc

The document @lparen@ contains a left parenthesis, "(".

#list Source

list :: Array Doc -> Doc

The document @(list xs)@ comma separates the documents @xs@ and

#linebreak Source

linebreak :: Doc

The @linebreak@ document advances to the next line and indents to

#line Source

line :: Doc

The @line@ document advances to the next line and indents to the

#lbracket Source

lbracket :: Doc

The document @lbracket@ contains a left square bracket, "[".

#lbrace Source

lbrace :: Doc

The document @lbrace@ contains a left brace, "{".

#langle Source

langle :: Doc

The document @langle@ contains a left angle, "<".

#int Source

int :: Int -> Doc

The document @(int i)@ shows the literal integer @i@ using 'text'.

#indentation Source

#indent Source

indent :: Int -> Doc -> Doc

The document @(indent i x)@ indents document @x@ with @i@ spaces.

#hsep Source

hsep :: Array Doc -> Doc

The document @(hsep xs)@ concatenates all documents @xs@

#hcat Source

hcat :: Array Doc -> Doc

The document @(hcat xs)@ concatenates all documents @xs@

#hardline Source

hardline :: Doc

A linebreak that will never be flattened; it is guaranteed to render

#hang Source

hang :: Int -> Doc -> Doc

The hang combinator implements hanging indentation. The document

#group Source

group :: Doc -> Doc

The @group@ combinator is used to specify alternative

#foldr1 Source

foldr1 :: forall a. Monoid a => (a -> a -> a) -> Array a -> a

#flatten Source

#flatAlt Source

flatAlt :: Doc -> Doc -> Doc

A document that is normally rendered as the first argument, but

#fitsR Source

fitsR :: Int -> Int -> Int -> SimpleDoc -> Boolean

#fits1 Source

fits1 :: Int -> Int -> Int -> SimpleDoc -> Boolean

#fillSep Source

fillSep :: Array Doc -> Doc

The document @(fillSep xs)@ concatenates documents @xs@

#fillCat Source

fillCat :: Array Doc -> Doc

The document @(fillCat xs)@ concatenates documents @xs@

#fillBreak Source

fillBreak :: Int -> Doc -> Doc

The document @(fillBreak i x)@ first renders document @x@. It

#fill Source

fill :: Int -> Doc -> Doc

The document @(fill i x)@ renders document @x@. It than appends

#equals Source

equals :: Doc

The document @equals@ contains an equal sign, "=".

#encloseSep Source

encloseSep :: Doc -> Doc -> Doc -> Array Doc -> Doc

The document @(encloseSep l r sep xs)@ concatenates the documents

#enclose Source

enclose :: Doc -> Doc -> Doc -> Doc

The document @(enclose l r x)@ encloses document @x@ between

#empty Source

empty :: Doc

The empty document is, indeed, empty. Although @empty@ has no

#dquotes Source

dquotes :: Doc -> Doc

Document @(dquotes x)@ encloses document @x@ with double quotes

#dquote Source

dquote :: Doc

The document @dquote@ contains a double quote, '"'.

#dot Source

dot :: Doc

The document @dot@ contains a single dot, ".".

#displayS Source

displayS :: SimpleDoc -> String

@(displayS simpleDoc)@ takes the output @simpleDoc@ from a

#comma Source

comma :: Doc

The document @comma@ contains a comma, ",".

#column Source

column :: (Int -> Doc) -> Doc

#colon Source

colon :: Doc

The document @colon@ contains a colon, ":".

#char Source

char :: Char -> Doc

The document @(char c)@ contains the literal character @c@. The

#cat Source

cat :: Array Doc -> Doc

The document @(cat xs)@ concatenates all documents @xs@ either

#brackets Source

brackets :: Doc -> Doc

Document @(brackets x)@ encloses document @x@ in square brackets,

#braces Source

braces :: Doc -> Doc

Document @(braces x)@ encloses document @x@ in braces, "{" and

#bool Source

bool :: Boolean -> Doc

The document @(bool b)@ shows the literal bool @b@ using 'text'.

#beside Source

beside :: Doc -> Doc -> Doc

#backslash Source

backslash :: Doc

The document @backslash@ contains a back slash, "\".

#appendWithSpace Source

appendWithSpace :: Doc -> Doc -> Doc

The document @(x <+> y)@ concatenates document @x@ and @y@ with a

#appendWithSoftline Source

appendWithSoftline :: Doc -> Doc -> Doc

The document @(x </> y)@ concatenates document @x@ and @y@ with a

#appendWithSoftbreak Source

appendWithSoftbreak :: Doc -> Doc -> Doc

The document @(x <//> y)@ concatenates document @x@ and @y@ with

#appendWithLinebreak Source

appendWithLinebreak :: Doc -> Doc -> Doc

The document @(x <$$> y)@ concatenates document @x@ and @y@ with

#appendWithLine Source

appendWithLine :: Doc -> Doc -> Doc

The document @(x <$> y)@ concatenates document @x@ and @y@ with a

#angles Source

angles :: Doc -> Doc

Document @(angles x)@ encloses document @x@ in angles, "<" and

#align Source

align :: Doc -> Doc

The document @(align x)@ renders document @x@ with the nesting

#(</>) Source

Operator alias for Text.PrettyPrint.Leijen.appendWithSoftline (right-associative / precedence 5)

#(<//>) Source

Operator alias for Text.PrettyPrint.Leijen.appendWithSoftbreak (right-associative / precedence 5)

#(<+>) Source

Operator alias for Text.PrettyPrint.Leijen.appendWithSpace (right-associative / precedence 6)

#(<$$>) Source

Operator alias for Text.PrettyPrint.Leijen.appendWithLinebreak (right-associative / precedence 5)