From 840290491f45157249ba97fb8f5e4cae9e04dc90 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 22 Sep 2023 07:33:02 +0200 Subject: Split the code into library and application --- app/SlackBuilder/Config.hs | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 app/SlackBuilder/Config.hs (limited to 'app/SlackBuilder/Config.hs') diff --git a/app/SlackBuilder/Config.hs b/app/SlackBuilder/Config.hs deleted file mode 100644 index c2a7f0b..0000000 --- a/app/SlackBuilder/Config.hs +++ /dev/null @@ -1,37 +0,0 @@ -module SlackBuilder.Config - ( Settings(..) - , MaintainerSettings(..) - , settingsCodec - ) where - -import Data.Text (Text) -import Toml ((.=)) -import qualified Toml - -data Settings = Settings - { ghToken :: !Text - , repository :: !FilePath - , 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 -settingsCodec = Settings - <$> Toml.text "gh_token" .= ghToken - <*> Toml.string "repository" .= repository - <*> 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 -- cgit v1.2.3