hindent-4.5.4: Extensible Haskell pretty printer

Safe HaskellNone
LanguageHaskell98

HIndent.Styles.Gibiansky

Synopsis

Documentation

data State Source

Empty state.

gibiansky :: Style Source

The printer style.

breakCommentLines :: Int -> String -> [String] Source

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.

maxSingleLineExports :: Integral a => a Source

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

modl :: Extend Module Source

Format whole modules.

pragmas :: Extend ModulePragma Source

Format pragmas differently (language pragmas).

pat :: Extend Pat Source

Format patterns.

imp :: Extend ImportDecl Source

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.

context :: Extend Context Source

Format contexts with spaces and commas between class constraints.

derivings :: Extend Deriving Source

Format deriving clauses with spaces and commas between class constraints.

typ :: Extend Type Source

Format function type declarations.

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

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