hindent-5.2.3: Extensible Haskell pretty printer

Safe Haskell | None
Language | Haskell98

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 #

Format the given source.

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

Print the module.

parseMode :: ParseMode #

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

# Testing

test :: ByteString -> IO () #

Test with the given style, prints to stdout.

testFile :: FilePath -> IO () #

Test the given file.

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

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

testFileAst :: FilePath -> IO () #

Test the given file.

defaultExtensions :: [Extension] #

Default extensions.

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

Consume an extensions list from arguments.