From: Michael Orlitzky Date: Fri, 17 Oct 2014 16:50:13 +0000 (-0400) Subject: Fix an hlint suggestion. X-Git-Tag: 0.2.0~8 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=693c0f45aff513b42d6d612c0a93fddc8f5c3cca;p=dead%2Fhtsn-import.git Fix an hlint suggestion. --- 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.