]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/InjuriesDetail.hs
Fixing compiler warnings by exporting stuff that shouldn't be exported (woo).
[dead/htsn-import.git] / src / TSN / XML / InjuriesDetail.hs
index c06768ed554c2f9aa399afd948f23838f79ace62..171b879a79726aff861cd6a3744f9b9ed95a4ded 100644 (file)
@@ -18,7 +18,9 @@
 --
 module TSN.XML.InjuriesDetail (
   injuries_detail_tests,
-  pickle_message )
+  pickle_message,
+  -- * WARNING: these are private but exported to silence warnings
+  PlayerListingConstructor(..) )
 where
 
 import Data.Time ( UTCTime )
@@ -39,9 +41,9 @@ import Text.XML.HXT.Core (
   xpElem,
   xpInt,
   xpList,
+  xpOption,
   xpPrim,
   xpText,
-  xpText0,
   xpWrap )
 
 import TSN.Picklers( xp_date, xp_team_id )
@@ -60,7 +62,7 @@ data PlayerListing =
     name      :: String,
     injury    :: String,
     status    :: String,
-    fantasy   :: String, -- ^ Nobody knows what this is.
+    fantasy   :: Maybe String, -- ^ Nobody knows what this is.
     injured     :: Bool,
     injury_type :: String -- ^ "type" is a reserved keyword so we can't use it
     }
@@ -121,7 +123,7 @@ pickle_player_listing =
               (xpElem "Name" xpText)
               (xpElem "Injury" xpText)
               (xpElem "Status" xpText)
-              (xpElem "Fantasy" xpText0)
+              (xpElem "Fantasy" $ xpOption xpText)
               (xpElem "Injured" xpPrim)
               (xpElem "Type" xpText)
   where