X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FNews.hs;h=3f9fef5375b58ec440eed4c041985871ed0d6300;hb=83bad08d7f28143cdaae42156d951b421fa15a8a;hp=a36ff7edec1abcbf4a2b862853071c5f2d6a205f;hpb=d88388235ec3df702f80e70d50898850befef6ed;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/News.hs b/src/TSN/XML/News.hs index a36ff7e..3f9fef5 100644 --- a/src/TSN/XML/News.hs +++ b/src/TSN/XML/News.hs @@ -53,7 +53,6 @@ import Text.XML.HXT.Core ( xpOption, xpPair, xpText, - xpTriple, xpWrap ) -- Local imports. @@ -63,7 +62,7 @@ import TSN.Codegen ( import TSN.Database ( insert_or_select ) import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.Picklers ( xp_time_stamp ) -import TSN.Location ( Location(..) ) +import TSN.Location ( Location(..), pickle_location ) import TSN.XmlImport ( XmlImport(..) ) import Xml ( FromXml(..), @@ -342,20 +341,6 @@ pickle_msg_id = to_tuple m = (db_msg_id m, db_event_id m) --- | Convert a 'Location' to/from XML. --- -pickle_location :: PU Location -pickle_location = - xpElem "location" $ - xpWrap (from_tuple, to_tuple) $ - xpTriple (xpOption (xpElem "city" xpText)) - (xpOption (xpElem "state" xpText)) - (xpElem "country" xpText) - where - from_tuple = - uncurryN Location - to_tuple l = (city l, state l, country l) - -- | Convert a 'Message' to/from XML. --