]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/InjuriesDetail.hs
Use (xpOption xpText) instead of xpText0.
[dead/htsn-import.git] / src / TSN / XML / InjuriesDetail.hs
index c06768ed554c2f9aa399afd948f23838f79ace62..3f8be8f4ccd118caf61fbf1f3a1bc5f8345d4568 100644 (file)
@@ -39,9 +39,9 @@ import Text.XML.HXT.Core (
   xpElem,
   xpInt,
   xpList,
+  xpOption,
   xpPrim,
   xpText,
-  xpText0,
   xpWrap )
 
 import TSN.Picklers( xp_date, xp_team_id )
@@ -60,7 +60,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 +121,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