Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3 |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Data types and type class instances shared between modules.
Synopsis
- data AppConfigError
- data HeadroomError
- data NewLine
- data RunMode
- data InitCommandError
Documentation
data AppConfigError Source #
Error occured during validation of application configuration.
EmptySourcePaths | no paths to source code files provided |
EmptyTemplatePaths | no paths to license header templates provided |
Instances
Show AppConfigError Source # | |
Defined in Headroom.Types showsPrec :: Int -> AppConfigError -> ShowS # show :: AppConfigError -> String # showList :: [AppConfigError] -> ShowS # |
data HeadroomError Source #
Represents fatal application error, that should be displayed to user in some human readable form.
InvalidAppConfig [AppConfigError] | invalid application configuration |
InvalidLicense Text | unknown license is selected in Generator |
InvalidVariable Text | invalid variable format ( |
MissingVariables Text [Text] | not all variables were filled in template |
NoGenModeSelected | no mode for Generator command is selected |
ParseError Text | error parsing template file |
InitCommandError InitCommandError | error during execution of Init command |
Instances
Show HeadroomError Source # | |
Defined in Headroom.Types showsPrec :: Int -> HeadroomError -> ShowS # show :: HeadroomError -> String # showList :: [HeadroomError] -> ShowS # | |
Exception HeadroomError Source # | |
Defined in Headroom.Types |
Represents newline separator.
Mode of the Run command, states how to license headers in source code files.
Add | add license header if missing in source code file |
Drop | drop any license header if present in source code file |
Replace | replace existing or add license header |
Instances
Eq RunMode Source # | |
Show RunMode Source # | |
FromJSON RunMode Source # | |
Defined in Headroom.Types parseJSON :: Value -> Parser RunMode parseJSONList :: Value -> Parser [RunMode] | |
ToJSON RunMode Source # | |
Defined in Headroom.Types toEncoding :: RunMode -> Encoding toJSONList :: [RunMode] -> Value toEncodingList :: [RunMode] -> Encoding |
data InitCommandError Source #
Errors specific for the Init command.
AppConfigAlreadyExists | application configuration file already exists |
InvalidLicenseType Text | invalid license type specified |
NoSourcePaths | no paths to source code files provided |
NoSupportedFileType | no supported file types found on source paths |
Instances
Show InitCommandError Source # | |
Defined in Headroom.Types showsPrec :: Int -> InitCommandError -> ShowS # show :: InitCommandError -> String # showList :: [InitCommandError] -> ShowS # |