optparse-applicative-fork-0.16.1.0: Utilities and combinators for parsing command line options
Safe Haskell Safe-Inferred
Language Haskell98

Options.Applicative.Help.Pretty

Synopsis

Documentation

groupOrNestLine :: Doc -> Doc Source #

Render flattened text on this line, or start a new line before rendering any text.

This will also nest subsequent lines in the group.

altSep :: Doc -> Doc -> Doc Source #

Separate items in an alternative with a pipe.

If the first document and the pipe don't fit on the line, then mandatorily flow the next entry onto the following line.

The ( // ) softbreak ensures that if the document does fit on the line, there is at least a space, but it's possible for y to still appear on the next line.

enclose Source #

Arguments

:: Doc

L

-> Doc

R

-> Doc

x

-> Doc

LxR

Traced version of enclose .

isEffectivelyEmpty :: Doc -> Bool Source #

Determine if the document is empty when rendered

renderShowS :: SimpleDocStream ann -> ShowS Source #

Render a SimpleDocStream to a ShowS , useful to write Show instances based on the prettyprinter.

instance Show MyType where
    showsPrec _ = renderShowS . layoutPretty defaultLayoutOptions . pretty