--
data Configuration =
Configuration {
- both :: Bool,
database :: Maybe String,
detail :: Bool,
host :: Maybe String,
-- values.
instance Default Configuration where
def = Configuration {
- both = def,
database = def,
detail = def,
host = def,
-> Configuration
merge_optional cfg opt_cfg =
Configuration
- (merge (both cfg) (OC.both opt_cfg))
(OC.merge_maybes (database cfg) (OC.database opt_cfg))
(merge (detail cfg) (OC.detail opt_cfg))
(OC.merge_maybes (host cfg) (OC.host opt_cfg))