hindent-6.1.1: Extensible Haskell pretty printer
Safe HaskellSafe-Inferred
LanguageHaskell2010

HIndent

Description

Haskell indenter.

Synopsis

The entry point.

hindent :: [String] -> IO () Source #

Runs HIndent with the given commandline options.

Formatting functions.

Config

data Config Source #

Configurations shared among the different styles. Styles may pay attention to or completely disregard this configuration.

Constructors

Config 

Fields

Instances

Instances details
FromJSON Config Source # 
Instance details

Defined in HIndent.Config

defaultConfig :: Config Source #

Default style configuration.

getConfig :: IO Config Source #

Read config from a config file, or return defaultConfig.

Extension

data Extension Source #

Language Extension. Either enabled or disabled.

The Cabal package also has an Extension type that can be used to indicate whether an extension is enabled or disabled, but Cabal's one should be avoided as much as possible. The KnownExtension of Cabal may not have the latest extensions, and if such extensions are used, there will be cases where GHC can build, but HIndent cannot format.

Instances

Instances details
Eq Extension Source # 
Instance details

Defined in HIndent.LanguageExtension.Types

Error

data ParseError Source #

Parse error type with the location.

Constructors

ParseError 

Fields

Testing

testAst :: ByteString -> Either ParseError HsModule' Source #

Generate an AST from the given module for debugging.

type HsModule' = HsModule GhcPs Source #

The wrapper for HsModule