- -- Used for the to/from address
- merge' :: Maybe a -> Maybe a -> Maybe a
- merge' Nothing Nothing = Nothing
- merge' (Just x) Nothing = Just x
- merge' Nothing (Just x) = Just x
- merge' (Just _) (Just y) = Just y
-
- -- If there are any optional usernames, use only those.
- all_usernames = if (null (get_usernames (OC.usernames opt_cfg)))
- then (usernames cfg)
- else (OC.usernames opt_cfg)
+ -- Used for the truly optional fields
+ merge_maybes :: Maybe a -> Maybe a -> Maybe a
+ merge_maybes Nothing Nothing = Nothing
+ merge_maybes (Just x) Nothing = Just x
+ merge_maybes Nothing (Just x) = Just x
+ merge_maybes (Just _) (Just y) = Just y