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(..),
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.
}
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'.
(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