X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuriesDetail.hs;h=3f8be8f4ccd118caf61fbf1f3a1bc5f8345d4568;hb=71e4436c45b1694fbc550d5cfc2a0cde216610f6;hp=c06768ed554c2f9aa399afd948f23838f79ace62;hpb=2f0d419104ac1ad108ae1b29d6722ed032286665;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/InjuriesDetail.hs b/src/TSN/XML/InjuriesDetail.hs index c06768e..3f8be8f 100644 --- a/src/TSN/XML/InjuriesDetail.hs +++ b/src/TSN/XML/InjuriesDetail.hs @@ -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