from_xml OddsGameHomeTeamXml{..} =
Team {
team_id = xml_home_team_id,
- team_abbreviation = xml_home_abbr,
- team_name = xml_home_team_name }
+ team_abbreviation = Just xml_home_abbr,
+ team_name = Just xml_home_team_name }
-- | This allows us to insert the XML representation
-- 'OddsGameHomeTeamXml' directly.
--
from_xml OddsGameAwayTeamXml{..} = Team
xml_away_team_id
- xml_away_abbr
- xml_away_team_name
+ (Just xml_away_abbr)
+ (Just xml_away_team_name)
-- | This allows us to insert the XML representation
-- 'OddsGameAwayTeamXml' directly.
test_pickle_of_unpickle_is_identity :: TestTree
test_pickle_of_unpickle_is_identity = testGroup "pickle-unpickle tests"
[ check "pickle composed with unpickle is the identity"
- "test/xml/Odds_XML.xml",
+ "test/xml/Odds_XML.xml",
check "pickle composed with unpickle is the identity (non-int team_id)"
"test/xml/Odds_XML-noninteger-team-id.xml",