From: Michael Orlitzky Date: Fri, 2 Jan 2015 18:29:29 +0000 (-0500) Subject: Fix unused field warnings in TSN.XML.AutoRacingResults. X-Git-Tag: 0.2.1~28 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f2c9d5fe3dcbc43309c0561d55442cf26b67889a;p=dead%2Fhtsn-import.git Fix unused field warnings in TSN.XML.AutoRacingResults. --- diff --git a/src/TSN/XML/AutoRacingResults.hs b/src/TSN/XML/AutoRacingResults.hs index 9acbe01..e2bb7e7 100644 --- a/src/TSN/XML/AutoRacingResults.hs +++ b/src/TSN/XML/AutoRacingResults.hs @@ -1,3 +1,4 @@ + {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} @@ -175,24 +176,25 @@ instance XmlImport Message -- * AutoRacingResultsListing/AutoRacingResultsListingXml -- | Database representation of a \ contained within a --- \. +-- \. The leading underscores prevent unused field +-- warnings. -- data AutoRacingResultsListing = AutoRacingResultsListing { - db_auto_racing_results_id :: DefaultKey AutoRacingResults, - db_finish_position :: Int, - db_starting_position :: Int, - db_car_number :: Int, - db_driver_id :: Int, - db_driver :: String, - db_car_make :: String, - db_points :: Int, - db_laps_completed :: Int, - db_laps_leading :: Int, - db_status :: Maybe String, - db_dnf :: Maybe Bool, - db_nc :: Maybe Bool, - db_earnings :: Maybe Int } + _db_auto_racing_results_id :: DefaultKey AutoRacingResults, + _db_finish_position :: Int, + _db_starting_position :: Int, + _db_car_number :: Int, + _db_driver_id :: Int, + _db_driver :: String, + _db_car_make :: String, + _db_points :: Int, + _db_laps_completed :: Int, + _db_laps_leading :: Int, + _db_status :: Maybe String, + _db_dnf :: Maybe Bool, + _db_nc :: Maybe Bool, + _db_earnings :: Maybe Int } deriving ( GHC.Generic ) -- | For 'Generics.prepend'. @@ -200,23 +202,24 @@ data AutoRacingResultsListing = instance Generic AutoRacingResultsListing -- | XML representation of a \ contained within a --- \. +-- \. The leading underscores prevent unused field +-- warnings. -- data AutoRacingResultsListingXml = AutoRacingResultsListingXml { - xml_finish_position :: Int, - xml_starting_position :: Int, - xml_car_number :: Int, - xml_driver_id :: Int, - xml_driver :: String, - xml_car_make :: String, - xml_points :: Int, - xml_laps_completed :: Int, - xml_laps_leading :: Int, - xml_status :: Maybe String, - xml_dnf :: Maybe Bool, - xml_nc :: Maybe Bool, - xml_earnings :: Maybe Int } + _xml_finish_position :: Int, + _xml_starting_position :: Int, + _xml_car_number :: Int, + _xml_driver_id :: Int, + _xml_driver :: String, + _xml_car_make :: String, + _xml_points :: Int, + _xml_laps_completed :: Int, + _xml_laps_leading :: Int, + _xml_status :: Maybe String, + _xml_dnf :: Maybe Bool, + _xml_nc :: Maybe Bool, + _xml_earnings :: Maybe Int } deriving (Eq, GHC.Generic, Show) -- | For 'Generics.to_tuple'. @@ -414,7 +417,7 @@ mkPersist tsn_codegen_config [groundhog| constructors: - name: AutoRacingResultsListing fields: - - name: db_auto_racing_results_id + - name: _db_auto_racing_results_id reference: onDelete: cascade