]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Fix an hlint suggestion.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 17 Oct 2014 16:50:13 +0000 (12:50 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 17 Oct 2014 16:50:13 +0000 (12:50 -0400)
src/TSN/XML/AutoRacingResults.hs

index e7ab014e50579c77fe9488639bd42549ce75f3b6..8a05e733226b4e418b519d75c9b9209def9496d1 100644 (file)
@@ -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.