2020-10-01 17:11:52 +00:00
|
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
|
|
module Types.Settings where
|
|
|
|
|
2021-06-09 21:45:43 +00:00
|
|
|
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
|
|
|
}
|
2021-06-09 21:45:43 +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
|
|
|
|
2021-06-09 21:45:43 +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
|