 Given a map of standard commodity display styles, apply the
-- appropriate one to this amount. If there's no standard style for
-- this amount's commodity, return the amount unchanged.
-- Also apply the style to the price (except for precision)
styleAmount :: M.Map CommoditySymbol AmountStyle -> Amount -> Amount
styleAmount styles a = styledAmount{aprice = stylePrice styles (aprice styledAmount)}
  where
    styledAmount = case M.lookup (acommodity a) styles of
      Just s -> a{astyle=s}
      Nothing -> a

st
styleAmount :: M.Map CommoditySymbol AmountStyle -> Amount -> Amount
styleAmount styles a = styledAmount{aprice = stylePrice styles (aprice styledAmount)}
  where
    styledAmount = case M.lookup (acommodity a) styles of
      Just s -> a{astyle=s}
      Nothing -> a
styleAmount styles a = styledAmount{aprice = stylePrice styles (aprice styledAmount)}
  where
    styledAmount = case M.lookup (acommodity a) styles of
      Just s -> a{astyle=s}
      Nothing -> a