]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/AutoRacingSchedule.hs
Update TSN.XML modules to use the new Child class.
[dead/htsn-import.git] / src / TSN / XML / AutoRacingSchedule.hs
index 212eee98a545f5cd106a64c900a136324727d570..01611d237157e0fa52d98fd36406afef7337be0b 100644 (file)
@@ -59,6 +59,7 @@ import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate )
 import TSN.Picklers ( xp_date_padded, xp_tba_time, xp_time_stamp )
 import TSN.XmlImport ( XmlImport(..), XmlImportFk(..) )
 import Xml (
+  Child(..),
   FromXml(..),
   FromXmlFk(..),
   ToDb(..),
@@ -192,12 +193,15 @@ instance ToDb AutoRacingScheduleListingXml where
   --
   type Db AutoRacingScheduleListingXml = AutoRacingScheduleListing
 
-instance FromXmlFk AutoRacingScheduleListingXml where
+
+instance Child AutoRacingScheduleListingXml where
   -- | Each 'AutoRacingScheduleListingXml' is contained in (i.e. has a
   --   foreign key to) a 'AutoRacingSchedule'.
   --
   type Parent AutoRacingScheduleListingXml = AutoRacingSchedule
 
+
+instance FromXmlFk AutoRacingScheduleListingXml where
   -- | To convert an 'AutoRacingScheduleListingXml' to an
   --   'AutoRacingScheduleListing', we add the foreign key and drop
   --   the 'xml_race_results'. We also mash the date/time together
@@ -289,7 +293,7 @@ instance ToDb AutoRacingScheduleListingRaceResultRaceResultListingXml where
     AutoRacingScheduleListingRaceResultRaceResultListing
 
 
-instance FromXmlFk AutoRacingScheduleListingRaceResultRaceResultListingXml where
+instance Child AutoRacingScheduleListingRaceResultRaceResultListingXml where
   -- | Each 'AutoRacingScheduleListingRaceResultRaceResultListingXml'
   --   is contained in (i.e. has a foreign key to) an
   --   'AutoRacingScheduleListing'. We skip the intermediate
@@ -298,6 +302,8 @@ instance FromXmlFk AutoRacingScheduleListingRaceResultRaceResultListingXml where
   type Parent AutoRacingScheduleListingRaceResultRaceResultListingXml =
     AutoRacingScheduleListing
 
+
+instance FromXmlFk AutoRacingScheduleListingRaceResultRaceResultListingXml where
   -- | To convert an
   --   'AutoRacingScheduleListingRaceResultRaceResultListingXml' to an
   --   'AutoRacingScheduleListingRaceResultRaceResultListing', we just