module Summoner.Settings
( Settings (..)
, CustomPrelude (..)
, customPreludeT
) where
import Toml (TomlCodec, (.=))
import Summoner.GhcVer (GhcVer)
import Summoner.License (License, LicenseName)
import qualified Toml
data CustomPrelude = CustomPrelude
{ cpPackage :: Text
, cpModule :: Text
} deriving (Show, Eq)
customPreludeT :: TomlCodec CustomPrelude
customPreludeT = CustomPrelude
<$> Toml.text "package" .= cpPackage
<*> Toml.text "module" .= cpModule
data Settings = Settings
{ settingsRepo :: !Text
, settingsOwner :: !Text
, settingsDescription :: !Text
, settingsFullName :: !Text
, settingsEmail :: !Text
, settingsYear :: !Text
, settingsCategories :: !Text
, settingsLicenseName :: !LicenseName
, settingsLicenseText :: !License
, settingsGitHub :: !Bool
, settingsPrivate :: !Bool
, settingsTravis :: !Bool
, settingsAppVeyor :: !Bool
, settingsIsLib :: !Bool
, settingsIsExe :: !Bool
, settingsTest :: !Bool
, settingsBench :: !Bool
, settingsTestedVersions :: ![GhcVer]
, settingsBaseType :: !Text
, settingsPrelude :: !(Maybe CustomPrelude)
, settingsExtensions :: ![Text]
, settingsWarnings :: ![Text]
, settingsCabal :: !Bool
, settingsStack :: !Bool
, settingsStylish :: !(Maybe Text)
, settingsContributing :: !(Maybe Text)
, settingsNoUpload :: !Bool
} deriving (Show)