diff options
Diffstat (limited to 'app/SlackBuilder/Config.hs')
| -rw-r--r-- | app/SlackBuilder/Config.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/SlackBuilder/Config.hs b/app/SlackBuilder/Config.hs index d7652e8..c2a7f0b 100644 --- a/app/SlackBuilder/Config.hs +++ b/app/SlackBuilder/Config.hs @@ -1,5 +1,6 @@ module SlackBuilder.Config ( Settings(..) + , MaintainerSettings(..) , settingsCodec ) where @@ -13,6 +14,12 @@ data Settings = Settings , branch :: Text , downloadURL :: Text , remotePath :: Text + , maintainer :: MaintainerSettings + } deriving (Eq, Show) + +data MaintainerSettings = MaintainerSettings + { name :: !Text + , email :: !Text } deriving (Eq, Show) settingsCodec :: Toml.TomlCodec Settings @@ -22,3 +29,9 @@ settingsCodec = Settings <*> Toml.text "branch" .= branch <*> Toml.text "download_url" .= downloadURL <*> Toml.text "remote_path" .= remotePath + <*> Toml.table maintainerSettingsCodec "maintainer" .= maintainer + +maintainerSettingsCodec :: Toml.TomlCodec MaintainerSettings +maintainerSettingsCodec = MaintainerSettings + <$> Toml.text "name" .= name + <*> Toml.text "email" .= email |
