X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuriesDetail.hs;h=171b879a79726aff861cd6a3744f9b9ed95a4ded;hb=9d2fd74804d0b7720fd8d0b68beafc6c2777c5d1;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..171b879 100644 --- a/src/TSN/XML/InjuriesDetail.hs +++ b/src/TSN/XML/InjuriesDetail.hs @@ -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