X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FAutoRacingResults.hs;fp=src%2FTSN%2FXML%2FAutoRacingResults.hs;h=8a05e733226b4e418b519d75c9b9209def9496d1;hb=693c0f45aff513b42d6d612c0a93fddc8f5c3cca;hp=e7ab014e50579c77fe9488639bd42549ce75f3b6;hpb=82a3bcaec3c0d54637f2f2a19f6d189a03d1ee8c;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/AutoRacingResults.hs b/src/TSN/XML/AutoRacingResults.hs index e7ab014..8a05e73 100644 --- a/src/TSN/XML/AutoRacingResults.hs +++ b/src/TSN/XML/AutoRacingResults.hs @@ -24,6 +24,7 @@ where -- System imports. import Control.Monad ( forM_ ) import Data.Data ( Data ) +import Data.Maybe ( fromMaybe ) import Data.Time ( UTCTime(..) ) import Data.Tuple.Curry ( uncurryN ) import Data.Typeable ( Typeable ) @@ -362,9 +363,9 @@ instance FromXmlFk AutoRacingResultsRaceInformationXml where -- the database with an (embedded) 'MostLapsLeading' with three -- missing fields. most_laps_leading = - case xml_most_laps_leading of - Just mll -> mll - Nothing -> MostLapsLeading Nothing Nothing Nothing + fromMaybe (MostLapsLeading Nothing Nothing Nothing) + xml_most_laps_leading + -- | This allows us to insert the XML representation -- 'AutoRacingResultsRaceInformationXml' directly.