]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/AutoRacingResults.hs
Split the (Parent a) associated type into a new Child class.
[dead/htsn-import.git] / src / TSN / XML / AutoRacingResults.hs
index bfc07d178b52c233cc691b19c2f3bab94a7aa3c8..817bf15cd0c10212697b8067ee4711e3951de15a 100644 (file)
@@ -60,7 +60,7 @@ import Text.XML.HXT.Core (
 import TSN.Codegen (
   tsn_codegen_config )
 import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate )
-import TSN.Picklers ( xp_earnings, xp_racedate, xp_time_stamp )
+import TSN.Picklers ( xp_earnings, xp_datetime, xp_time_stamp )
 import TSN.XmlImport ( XmlImport(..), XmlImportFk(..) )
 import Xml (
   FromXml(..),
@@ -162,7 +162,7 @@ instance XmlImport Message
 -- * AutoRacingResultsListing/AutoRacingResultsListingXml
 
 -- | Database representation of a \<Listing\> contained within a
---   \<Message\>.
+--   \<message\>.
 --
 data AutoRacingResultsListing =
   AutoRacingResultsListing {
@@ -261,8 +261,8 @@ data MostLapsLeading =
   deriving (Data, Eq, Show, Typeable)
 
 
--- | Database representation of a \<Race_Information\> contained within a
---   \<Message\>.
+-- | Database representation of a \<Race_Information\> contained
+--   within a \<message\>.
 --
 data AutoRacingResultsRaceInformation =
   AutoRacingResultsRaceInformation {
@@ -472,7 +472,7 @@ pickle_message =
               (xpElem "category" xpText)
               (xpElem "sport" xpText)
               (xpElem "RaceID" xpInt)
-              (xpElem "RaceDate" xp_racedate)
+              (xpElem "RaceDate" xp_datetime)
               (xpElem "Title" xpText)
               (xpElem "Track_Location" xpText)
               (xpElem "Laps_Remaining" xpInt)
@@ -522,7 +522,7 @@ pickle_race_information =
     xpWrap (from_tuple, to_tuple) $
     xp11Tuple (-- I can't think of another way to get both the
                -- TrackLength and its KPH attribute. So we shove them
-               -- both in a 2-tuple.
+               -- both in a 2-tuple. This should probably be an embedded type!
                  xpElem "TrackLength" $ xpPair xpPrim (xpAttr "KPH" xpPrim) )
               (xpElem "Laps" xpInt)
               (xpOption $ xpElem "AverageSpeedMPH" xpPrim)