- -- We don't need the key argument (from_xml_fk) since the XML type
- -- contains more information in this case.
- from_xml (Message _ _ c _ e f _ _ i j k l _) =
- News c e f i j k l
-
+ -- | We use a record wildcard so GHC doesn't complain that we never
+ -- used the field names.
+ --
+ from_xml Message{..} = News { db_mid = xml_mid,
+ db_sport = xml_sport,
+ db_url = xml_url,
+ db_sms = xml_sms,
+ db_editor = xml_editor,
+ db_text = xml_text,
+ db_continue = xml_continue }
+
+-- | This lets us call 'insert_xml' on a 'Message'.
+--