Language.Haskell.Stylish

stylish-haskell-0.8.1.0: Haskell code prettifier

Safe Haskell | None
Language | Haskell98

Language.Haskell.Stylish

Contents

- Run
- Steps
  - Helpers
- Config
- Misc

Synopsis

- runSteps :: Extensions -> Maybe FilePath -> [Step] -> Lines -> Either String Lines
- simpleAlign :: Int -> Config -> Step
- imports :: Int -> Options -> Step
- languagePragmas :: Int -> Style -> Bool -> Bool -> Step
- tabs :: Int -> Step
- trailingWhitespace :: Step
- unicodeSyntax :: Bool -> Step
- stepName :: Step -> String
- type Extensions = [String]
- data Config = Config {
  - configSteps :: [Step]
  - configColumns :: Int
  - configLanguageExtensions :: [String]
  - configNewline :: Newline
  }
- defaultConfigFilePath :: IO FilePath
- configFilePath :: Verbose -> Maybe FilePath -> IO FilePath
- loadConfig :: Verbose -> Maybe FilePath -> IO Config
- type Verbose = String -> IO ()
- makeVerbose :: Bool -> Verbose
- version :: Version
- type Lines = [String]
- data Step

# Run

runSteps :: Extensions -> Maybe FilePath -> [Step] -> Lines -> Either String Lines #

# Steps

simpleAlign #

Arguments

:: Int | Columns
-> Config |
-> Step |

imports #

Arguments

:: Int | columns
-> Options |
-> Step |

languagePragmas #

Arguments

:: Int | columns
-> Style |
-> Bool | Pad to same length in vertical mode?
-> Bool | remove redundant?
-> Step |

tabs #

Arguments

:: Int | number of spaces
-> Step |

trailingWhitespace :: Step #

unicodeSyntax #

Arguments

:: Bool | add language pragma?
-> Step |

## Helpers

stepName :: Step -> String #

# Config

type Extensions = [String] #

data Config #

Constructors

Config |
Fields configSteps :: [Step] configColumns :: Int configLanguageExtensions :: [String] configNewline :: Newline

Instances

FromJSON Config # |
Methods parseJSON :: Value -> Parser Config # parseJSONList :: Value -> Parser [Config] #

defaultConfigFilePath :: IO FilePath #

configFilePath :: Verbose -> Maybe FilePath -> IO FilePath #

loadConfig :: Verbose -> Maybe FilePath -> IO Config #

# Misc

type Verbose = String -> IO () #

makeVerbose :: Bool -> Verbose #

version :: Version #

type Lines = [String] #

data Step #