floskell-0.11.1: A flexible Haskell source code pretty printer

Safe Haskell | None
Language | Haskell2010

Floskell.ConfigFile

Synopsis

- data AppConfig = AppConfig {
  - appStyle :: Style
  - appLanguage :: Language
  - appExtensions :: [Extension]
  - appFixities :: [Fixity]
  }
- defaultAppConfig :: AppConfig
- findAppConfig :: IO (Maybe FilePath)
- findAppConfigIn :: FilePath -> IO (Maybe FilePath)
- readAppConfig :: FilePath -> IO AppConfig
- showStyle :: Style -> String
- showLanguage :: Language -> String
- showExtension :: Extension -> String
- showFixity :: Fixity -> String
- lookupStyle :: String -> Style
- lookupLanguage :: String -> Language
- lookupExtension :: String -> Extension
- lookupFixity :: String -> Fixity
- setStyle :: AppConfig -> Maybe String -> AppConfig
- setLanguage :: AppConfig -> Maybe String -> AppConfig
- setExtensions :: AppConfig -> [String] -> AppConfig
- setFixities :: AppConfig -> [String] -> AppConfig

# Documentation

data AppConfig #

Constructors

AppConfig |
Fields appStyle :: Style appLanguage :: Language appExtensions :: [Extension] appFixities :: [Fixity]

#### Instances

Instances details

FromJSON AppConfig # |
Instance details Defined in Floskell.ConfigFile Methods parseJSON :: Value -> Parser AppConfig # parseJSONList :: Value -> Parser [AppConfig] # omittedField :: Maybe AppConfig #
ToJSON AppConfig # |
Instance details Defined in Floskell.ConfigFile Methods toJSON :: AppConfig -> Value # toEncoding :: AppConfig -> Encoding # toJSONList :: [AppConfig] -> Value # toEncodingList :: [AppConfig] -> Encoding # omitField :: AppConfig -> Bool #
Generic AppConfig # |
Instance details Defined in Floskell.ConfigFile Associated Types
type Rep AppConfig |
Instance details Defined in Floskell.ConfigFile type Rep AppConfig = D1 ('MetaData "AppConfig" "Floskell.ConfigFile" "floskell-0.11.1-If3Z75J2neZ5JNi0eSSCAs" 'False) (C1 ('MetaCons "AppConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "appStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Just "appLanguage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language)) :*: (S1 ('MetaSel ('Just "appExtensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Extension]) :*: S1 ('MetaSel ('Just "appFixities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Fixity]))))
Methods from :: AppConfig -> Rep AppConfig x # to :: Rep AppConfig x -> AppConfig #
type Rep AppConfig # |
Instance details Defined in Floskell.ConfigFile type Rep AppConfig = D1 ('MetaData "AppConfig" "Floskell.ConfigFile" "floskell-0.11.1-If3Z75J2neZ5JNi0eSSCAs" 'False) (C1 ('MetaCons "AppConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "appStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Just "appLanguage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language)) :*: (S1 ('MetaSel ('Just "appExtensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Extension]) :*: S1 ('MetaSel ('Just "appFixities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Fixity]))))

defaultAppConfig :: AppConfig #

Default program configuration.

findAppConfig :: IO (Maybe FilePath) #

Try to find a configuration file based on current working directory, or in one of the application configuration directories.

findAppConfigIn :: FilePath -> IO (Maybe FilePath) #

readAppConfig :: FilePath -> IO AppConfig #

Load a configuration file.

showStyle :: Style -> String #

Show name of a style.

showLanguage :: Language -> String #

Show a Haskell language name.

showExtension :: Extension -> String #

Show a Haskell language extension.

showFixity :: Fixity -> String #

Show a fixity declaration.

lookupStyle :: String -> Style #

Lookup a style by name.

lookupLanguage :: String -> Language #

Lookup a language by name.

lookupExtension :: String -> Extension #

Lookup an extension by name.

lookupFixity :: String -> Fixity #

Parse a fixity declaration.

setStyle :: AppConfig -> Maybe String -> AppConfig #

setLanguage :: AppConfig -> Maybe String -> AppConfig #

setExtensions :: AppConfig -> [String] -> AppConfig #

setFixities :: AppConfig -> [String] -> AppConfig #