X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhtsn-import.git;a=blobdiff_plain;f=src%2FTSN%2FXML%2FAutoRacingSchedule.hs;fp=src%2FTSN%2FXML%2FAutoRacingSchedule.hs;h=edfcaacb44c919fa6cf507b0fc5f6c0856ebd1f9;hp=64132bcb0f1ad7bf07903d7c9200eb81051371c1;hb=7b33eb87f59d46ec97d619f7521c067d8a6b9308;hpb=3c1e37ee3ead276288ac167b6b8f75f4060ca1b2 diff --git a/src/TSN/XML/AutoRacingSchedule.hs b/src/TSN/XML/AutoRacingSchedule.hs index 64132bc..edfcaac 100644 --- a/src/TSN/XML/AutoRacingSchedule.hs +++ b/src/TSN/XML/AutoRacingSchedule.hs @@ -58,7 +58,7 @@ import Text.XML.HXT.Core ( import TSN.Codegen ( tsn_codegen_config ) import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) -import TSN.Picklers ( xp_date_padded, xp_tba_time, xp_time_stamp ) +import TSN.Picklers ( xp_date_padded, xp_tba_int, xp_tba_time, xp_time_stamp ) import TSN.XmlImport ( XmlImport(..), XmlImportFk(..) ) import Xml ( Child(..), @@ -160,7 +160,7 @@ data AutoRacingScheduleListing = db_track_name :: String, db_location :: String, db_tv_listing :: Maybe String, - db_laps :: Int, + db_laps :: Maybe Int, db_track_length :: String -- ^ Sometimes the word "miles" shows up. } @@ -177,7 +177,7 @@ data AutoRacingScheduleListingXml = xml_track_name :: String, xml_location :: String, xml_tv_listing :: Maybe String, - xml_laps :: Int, + xml_laps :: Maybe Int, xml_track_length :: String, -- ^ Sometimes the word \"miles\" shows up, -- so we can't do the right thing and use -- a 'Double'. @@ -436,7 +436,7 @@ pickle_listing = (xpElem "TrackName" xpText) (xpElem "Location" xpText) (xpElem "TV_Listing" $ xpOption xpText) - (xpElem "Laps" xpInt) + (xpElem "Laps" xp_tba_int) (xpElem "TrackLength" xpText) (xpList pickle_race_results) where