X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FNews.hs;h=54169b982b00d278717d89e2a1042bde14cc6faf;hb=f0425854304197ab5ad47293b27b2e0b188cb844;hp=645d1daf1e786e1779e231c672094ce9da2c4754;hpb=32147474ba5c91452eeb532381f63e88c257a982;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/News.hs b/src/TSN/XML/News.hs index 645d1da..54169b9 100644 --- a/src/TSN/XML/News.hs +++ b/src/TSN/XML/News.hs @@ -72,7 +72,7 @@ import TSN.Codegen ( import TSN.Database ( insert_or_select ) import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.Location ( Location(..), pickle_location ) -import TSN.Picklers ( xp_time_stamp ) +import TSN.Picklers ( xp_attr_option, xp_time_stamp ) import TSN.Team ( Team(..) ) import TSN.XmlImport ( XmlImport(..) ) import Xml ( @@ -80,7 +80,7 @@ import Xml ( ToDb(..), pickle_unpickle, unpickleable, - unsafe_read_document, + unsafe_read_invalid_document, unsafe_unpickle ) @@ -389,7 +389,7 @@ pickle_msg_id :: PU MsgId pickle_msg_id = xpElem "msg_id" $ xpWrap (from_tuple, H.convert) $ - xpPair xpInt (xpAttr "EventId" (xpOption xpInt)) + xpPair xpInt (xpAttr "EventId" xp_attr_option) where from_tuple = uncurryN MsgId @@ -574,6 +574,6 @@ test_sms_detected_correctly = False ] where check path desc expected = testCase desc $ do - xmltree <- unsafe_read_document path + xmltree <- unsafe_read_invalid_document path let actual = has_only_single_sms xmltree actual @?= expected