+instance Semigroup OptionalConfiguration where
+ -- | Combine @cfg1@ and @cfg2@, giving precedence to @cfg2@.
+ cfg1 <> cfg2 =
+ OptionalConfiguration
+ (merge_maybes (database cfg1) (database cfg2))
+ (merge_maybes (detail cfg1) (detail cfg2))
+ (merge_maybes (detail_query cfg1) (detail_query cfg2))
+ (merge_maybes (host cfg1) (host cfg2))
+ (merge_maybes (password cfg1) (password cfg2))
+ (merge_maybes (port cfg1) (port cfg2))
+ (merge_maybes (summary_query cfg1) (summary_query cfg2))
+ (merge_maybes (username cfg1) (username cfg2))
+
+
+-- | The Monoid instance essentially only provides the "empty
+-- configuration."