stylish-haskell-0.15.0.0: Haskell code prettifier
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.Stylish

Synopsis

Run

Steps

simpleAlign Source #

Arguments

:: Maybe Int

Columns

-> Config 
-> Step 

imports Source #

Arguments

:: Maybe Int

columns

-> Options 
-> Step 

languagePragmas Source #

Arguments

:: Maybe Int

columns

-> Style 
-> Bool

Pad to same length in vertical mode?

-> Bool

remove redundant?

-> String

language prefix

-> Step 

tabs Source #

Arguments

:: Int

number of spaces

-> Step 

unicodeSyntax Source #

Arguments

:: Bool

add language pragma?

-> String

language prefix

-> Step 

Helpers

findHaskellFiles :: Bool -> [FilePath] -> IO [FilePath] Source #

Searches Haskell source files in any given folder recursively.

Config

Misc

type Verbose = String -> IO () Source #

format Source #

Arguments

:: ConfigSearchStrategy 
-> Maybe FilePath

the location from which the contents to format were read. If provided, it's going to be printed out in the error message.

-> String

the contents to format

-> IO (Either String Lines) 

Formats given contents.

data ConfigSearchStrategy Source #

Constructors

UseConfig FilePath

Don't try to search, just use given config file

SearchFromDirectory FilePath

Search for .stylish-haskell.yaml starting from given directory. If not found, try all ancestor directories, $XDG_CONFIG/stylish-haskell/config.yaml and $HOME/.stylish-haskell.yaml in order. If no config is found, default built-in config will be used.

SearchFromCurrentDirectory

Like SearchFromDirectory, but using current working directory as a starting point

type Lines = [String] Source #