Copyright | (c) 2017-2019 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Summoner configurations.
Synopsis
- data ConfigP (p :: Phase) = ConfigP {
- cOwner :: !(p :- Text)
- cFullName :: !(p :- Text)
- cEmail :: !(p :- Text)
- cLicense :: !(p :- LicenseName)
- cGhcVer :: !(p :- [GhcVer])
- cCabal :: !Decision
- cStack :: !Decision
- cGitHub :: !Decision
- cGhActions :: !Decision
- cTravis :: !Decision
- cAppVey :: !Decision
- cPrivate :: !Decision
- cLib :: !Decision
- cExe :: !Decision
- cTest :: !Decision
- cBench :: !Decision
- cPrelude :: !(Last CustomPrelude)
- cExtensions :: ![Text]
- cGhcOptions :: ![Text]
- cGitignore :: ![Text]
- cNoUpload :: !Any
- cFiles :: !(Map FilePath Source)
- type PartialConfig = ConfigP 'Partial
- type Config = ConfigP 'Final
- configCodec :: TomlCodec PartialConfig
- defaultConfig :: PartialConfig
- guessConfigFromGit :: IO PartialConfig
- finalise :: PartialConfig -> Validation [Text] Config
- loadFileConfig :: MonadIO m => FilePath -> m PartialConfig
Documentation
data ConfigP (p :: Phase) Source #
Potentially incomplete configuration.
ConfigP | |
|
Instances
Semigroup PartialConfig Source # | |
Defined in Summoner.Config (<>) :: PartialConfig -> PartialConfig -> PartialConfig # sconcat :: NonEmpty PartialConfig -> PartialConfig # stimes :: Integral b => b -> PartialConfig -> PartialConfig # | |
Monoid PartialConfig Source # | |
Defined in Summoner.Config mempty :: PartialConfig # mappend :: PartialConfig -> PartialConfig -> PartialConfig # mconcat :: [PartialConfig] -> PartialConfig # | |
(Eq (p :- Text), Eq (p :- LicenseName), Eq (p :- [GhcVer])) => Eq (ConfigP p) Source # | |
(Show (p :- Text), Show (p :- LicenseName), Show (p :- [GhcVer])) => Show (ConfigP p) Source # | |
Generic (ConfigP p) Source # | |
type Rep (ConfigP p) Source # | |
Defined in Summoner.Config |
type PartialConfig = ConfigP 'Partial Source #
Incomplete configurations.
configCodec :: TomlCodec PartialConfig Source #
Identifies how to read Config
data from the .toml
file.
defaultConfig :: PartialConfig Source #
Default Config
configurations.
guessConfigFromGit :: IO PartialConfig Source #
Try to retrieve user information from Git config.
Return the PartialConfig
with the corresponding filled fields if the
information is applicable.
finalise :: PartialConfig -> Validation [Text] Config Source #
Make sure that all the required configurations options were specified.
loadFileConfig :: MonadIO m => FilePath -> m PartialConfig Source #
Read configuration from the given file and return it in data type.