From 99eced1fcde33e5c5c63d8ae2853bda50eefec83 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Jan 2015 13:26:09 -0500 Subject: [PATCH] Fix unused field warnings in TSN.XML.AutoRacingDriverList. --- src/TSN/XML/AutoRacingDriverList.hs | 45 +++++++++++++++-------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/TSN/XML/AutoRacingDriverList.hs b/src/TSN/XML/AutoRacingDriverList.hs index 9d9e090..af4fb85 100644 --- a/src/TSN/XML/AutoRacingDriverList.hs +++ b/src/TSN/XML/AutoRacingDriverList.hs @@ -143,20 +143,21 @@ instance XmlImport Message -- AutoRacingDriverListListing / AutoRacingDriverListListingXml -- | Database representation of a \ contained within a --- \. +-- \. The leading underscores prevent unused field +-- warnings. -- data AutoRacingDriverListListing = AutoRacingDriverListListing { - db_auto_racing_driver_lists_id :: DefaultKey AutoRacingDriverList, - db_driver_id :: Int, - db_driver :: String, - db_height :: Maybe String, - db_weight :: Int, - db_date_of_birth :: UTCTime, - db_hometown :: String, - db_nationality :: Maybe String, - db_car_number :: Int, - db_car :: String } + _db_auto_racing_driver_lists_id :: DefaultKey AutoRacingDriverList, + _db_driver_id :: Int, + _db_driver :: String, + _db_height :: Maybe String, + _db_weight :: Int, + _db_date_of_birth :: UTCTime, + _db_hometown :: String, + _db_nationality :: Maybe String, + _db_car_number :: Int, + _db_car :: String } deriving ( GHC.Generic ) -- | For 'Generics.prepend'. @@ -165,19 +166,19 @@ instance Generic AutoRacingDriverListListing -- | XML representation of a \ contained within a --- \. +-- \. The underscores prevent unused field warnings. -- data AutoRacingDriverListListingXml = AutoRacingDriverListListingXml { - xml_driver_id :: Int, - xml_driver :: String, - xml_height :: Maybe String, - xml_weight :: Int, - xml_date_of_birth :: UTCTime, - xml_hometown :: String, - xml_nationality :: Maybe String, - xml_car_number :: Int, - xml_car :: String } + _xml_driver_id :: Int, + _xml_driver :: String, + _xml_height :: Maybe String, + _xml_weight :: Int, + _xml_date_of_birth :: UTCTime, + _xml_hometown :: String, + _xml_nationality :: Maybe String, + _xml_car_number :: Int, + _xml_car :: String } deriving (Eq, GHC.Generic, Show) -- | For 'Generics.to_tuple'. @@ -250,7 +251,7 @@ mkPersist tsn_codegen_config [groundhog| constructors: - name: AutoRacingDriverListListing fields: - - name: db_auto_racing_driver_lists_id + - name: _db_auto_racing_driver_lists_id reference: onDelete: cascade -- 2.43.2