hindent-5.1.1: Extensible Haskell pretty printer

Safe HaskellNone
LanguageHaskell98

HIndent

Contents

Description

Haskell indenter.

Synopsis

Formatting functions.

reformat :: Config -> Maybe [Extension] -> ByteString -> Either String Builder Source #

Format the given source.

prettyPrint :: Config -> Module SrcSpanInfo -> [Comment] -> Either a Builder Source #

Print the module.

parseMode :: ParseMode Source #

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

Testing

test :: ByteString -> IO () Source #

Test with the given style, prints to stdout.

testFile :: FilePath -> IO () Source #

Test the given file.

testAst :: ByteString -> Either String (Module NodeInfo) Source #

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

testFileAst :: FilePath -> IO () Source #

Test the given file.

defaultExtensions :: [Extension] Source #

Default extensions.

getExtensions :: [Text] -> [Extension] Source #

Consume an extensions list from arguments.