HIndent.Styles.Gibiansky

Synopsis

# Documentation

data State Source #

Empty state.

Constructors

 State Fields

The printer style.

Break a comment string into lines of a maximum character length. Each line starts with a space, mirroring the traditional way of writing comments:

• - Hello
• - Note the space after the -

indentSpaces :: Integral a => a Source #

Number of spaces to indent by.

indentOnce :: Printer s () Source #

Printer to indent one level.

How many exports to format in a single line. If an export list has more than this, it will be formatted as multiple lines.

type Extend f = f NodeInfo -> Printer State () Source #

Format whole modules.

Format pragmas differently (language pragmas).

Format patterns.

Format import statements.

prettyColLength :: (Integral a, Pretty ast) => ast NodeInfo -> Printer State a Source #

Return the number of columns between the start and end of a printer. Note that if it breaks lines, the line break is not counted; only column is used. So you probably only want to use this for single-line printers.

Format contexts with spaces and commas between class constraints.

Format deriving clauses with spaces and commas between class constraints.

Format function type declarations.

writeTuple :: Pretty ast => Boxed -> [ast NodeInfo] -> Printer State () Source #

sameLine :: (Annotated ast, Annotated ast') => ast NodeInfo -> ast' NodeInfo -> Bool Source #

lineDelta :: (Annotated ast1, Annotated ast2) => ast1 NodeInfo -> ast2 NodeInfo -> Int Source #