pickle_injuries_team =
xpElem "team" $
xpWrap (from_tuple, to_tuple) $
- xpPair xpText (xpAttr "league" (xpOption xpText))
+ xpPair xpText (xpOption $ xpAttr "league" xpText)
where
from_tuple = uncurryN InjuriesTeam
to_tuple m = (team_name m, team_league m)