hindent-5.3.4: Extensible Haskell pretty printer

Safe Haskell | Safe-Inferred
Language | Haskell2010

HIndent

Contents

- Formatting functions.
- Testing

Description

Haskell indenter.

Synopsis

- reformat :: Config -> Maybe [Extension] -> Maybe FilePath -> ByteString -> Either String Builder
- prettyPrint :: Config -> Module SrcSpanInfo -> [Comment] -> Either a Builder
- parseMode :: ParseMode
- test :: ByteString -> IO ()
- testFile :: FilePath -> IO ()
- testAst :: ByteString -> Either String (Module NodeInfo)
- testFileAst :: FilePath -> IO ()
- defaultExtensions :: [Extension]
- getExtensions :: [Text] -> [Extension]

# Formatting functions.

reformat :: Config -> Maybe [Extension] -> Maybe FilePath -> 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.