| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ormolu.Config
Description
Configuration options used by the tool.
Synopsis
- data Config region = Config {
- cfgDynOptions :: ![DynOption]
- cfgUnsafe :: !Bool
- cfgDebug :: !Bool
- cfgCheckIdempotence :: !Bool
- cfgRegion :: !region
- cfgPrinterOpts :: PrinterOpts
- data RegionIndices = RegionIndices {
- regionStartLine :: !(Maybe Int)
- regionEndLine :: !(Maybe Int)
- data RegionDeltas = RegionDeltas {}
- defaultConfig :: Config RegionIndices
- data PrinterOpts = PrinterOpts {
- poIndentStep :: Int
- defaultPrinterOpts :: PrinterOpts
- loadConfigFile :: Bool -> Maybe FilePath -> PrinterOpts -> IO PrinterOpts
- regionIndicesToDeltas :: Int -> RegionIndices -> RegionDeltas
- newtype DynOption = DynOption {}
- dynOptionToLocatedStr :: DynOption -> Located String
Documentation
Ormolu configuration.
Constructors
| Config | |
Fields
| |
data RegionIndices Source #
Region selection as the combination of start and end line numbers.
Constructors
| RegionIndices | |
Fields
| |
Instances
| Eq RegionIndices Source # | |
Defined in Ormolu.Config Methods (==) :: RegionIndices -> RegionIndices -> Bool # (/=) :: RegionIndices -> RegionIndices -> Bool # | |
| Show RegionIndices Source # | |
Defined in Ormolu.Config Methods showsPrec :: Int -> RegionIndices -> ShowS # show :: RegionIndices -> String # showList :: [RegionIndices] -> ShowS # | |
data RegionDeltas Source #
Region selection as the length of the literal prefix and the literal suffix.
Constructors
| RegionDeltas | |
Fields
| |
Instances
| Eq RegionDeltas Source # | |
Defined in Ormolu.Config | |
| Show RegionDeltas Source # | |
Defined in Ormolu.Config Methods showsPrec :: Int -> RegionDeltas -> ShowS # show :: RegionDeltas -> String # showList :: [RegionDeltas] -> ShowS # | |
defaultConfig :: Config RegionIndices Source #
Default .Config RegionIndices
data PrinterOpts Source #
Options controlling formatting output
Constructors
| PrinterOpts | |
Fields
| |
Instances
| Eq PrinterOpts Source # | |
Defined in Ormolu.Config | |
| Show PrinterOpts Source # | |
Defined in Ormolu.Config Methods showsPrec :: Int -> PrinterOpts -> ShowS # show :: PrinterOpts -> String # showList :: [PrinterOpts] -> ShowS # | |
loadConfigFile :: Bool -> Maybe FilePath -> PrinterOpts -> IO PrinterOpts Source #
Replace fields with those from a config file, if found.
Looks recursively in parent folders, then in XdgConfig,
for a file matching fourmolu.yaml'.
regionIndicesToDeltas Source #
Arguments
| :: Int | Total number of lines in the input |
| -> RegionIndices | Region indices |
| -> RegionDeltas | Region deltas |
Convert RegionIndices into RegionDeltas.
A wrapper for dynamic options.
Constructors
| DynOption | |
Fields | |
Instances
| Eq DynOption Source # | |
| Ord DynOption Source # | |
| Show DynOption Source # | |