hindent-4.3.7: Extensible Haskell pretty printer

Safe HaskellNone




Haskell indenter.


Formatting functions.

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

Format the given source.

prettyPrint :: Style -> (forall s. Printer s ()) -> Builder Source

Pretty print the given printable thing.

parseMode :: ParseMode Source

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


data Style Source

A printer style.


forall s . Style 


styleName :: !Text

Name of the style, used in the commandline interface.

styleAuthor :: !Text

Author of the printer (as opposed to the author of the style).

styleDescription :: !Text

Description of the style.

styleInitialState :: !s

User state, if needed.

styleExtenders :: ![Extender s]

Extenders to the printer.

styleDefConfig :: !Config

Default config to use for this style.

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.


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

Test with the given style, prints to stdout.

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.