From 693c0f45aff513b42d6d612c0a93fddc8f5c3cca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 17 Oct 2014 12:50:13 -0400 Subject: [PATCH] Fix an hlint suggestion. --- src/TSN/XML/AutoRacingResults.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- 2.43.2