mateamt/src/Types/Settings.hs

22 lines
369 B
Haskell
Raw Normal View History

2020-10-01 17:11:52 +00:00
{-# LANGUAGE TypeFamilies #-}
module Types.Settings where
import Classes
2020-10-01 17:11:52 +00:00
data Settings = Settings
2021-10-16 15:49:50 +00:00
{ settingsBlockRegistration :: Bool
2020-10-01 17:11:52 +00:00
}
deriving (Show)
2020-10-01 17:11:52 +00:00
instance ToDatabase Settings where
2021-10-16 15:49:50 +00:00
type InTuple Settings = Bool
2020-10-01 17:11:52 +00:00
2021-10-16 15:49:50 +00:00
toDatabase (Settings reg) = reg
2020-10-01 17:11:52 +00:00
instance FromDatabase Settings where
2020-10-01 17:11:52 +00:00
2021-10-16 15:49:50 +00:00
type OutTuple Settings = Bool
2020-10-01 17:11:52 +00:00
2021-10-16 15:49:50 +00:00
fromDatabase reg = Settings reg