hindent-4.6.1: Extensible Haskell pretty printer

Safe HaskellNone
LanguageHaskell98

HIndent

Contents

Description

Haskell indenter.

Synopsis

Formatting functions.

reformat :: Style -> Maybe [Extension] -> Text -> Either String Builder Source #

Format the given source.

parseMode :: ParseMode Source #

Parse mode, includes all extensions, doesn't assume any fixities.

Style

data Style Source #

A printer style.

Constructors

Style 

Fields

styles :: [Style] Source #

Styles list, useful for programmatically choosing.

chrisDone :: Style Source #

The printer style.

johanTibell :: Style Source #

The printer style.

fundamental :: Style Source #

The printer style.

gibiansky :: Style Source #

The printer style.

Testing

test :: Style -> Text -> IO () Source #

Test with the given style, prints to stdout.

testFile :: FilePath -> Style -> IO () Source #

Test the given file.

testAll :: Text -> IO () Source #

Test with all styles, prints to stdout.

testAst :: Text -> Either String ([ComInfo], Module NodeInfo) Source #

Parse the source and annotate it with comments, yielding the resulting AST.